随笔分类 - Selenium+Python
摘要:打开Pycharm->Settings->Project Interpreter, 选择Add
阅读全文
摘要:1. 打开pycharm>点击File>点击setting>打开Plugins>点击Browse reponsitories: 2. 打开后,输入IntelliBot并安装,安装后需要重启才能生效. 3.此时打开脚本,会发现不支持.txt的文件,此时需要对pycharm进一步设置 点击File>点击
阅读全文
摘要:python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'的解决方法: Import HTMLTestRunner 1.原因是官网的是python2语法写的,看官手动把官网的HTMLTestRunner.py改成python3
阅读全文
摘要:css_selector定位详解 driver.find_element_by_css_selector() css定位可以分为四类:id、class、其他属性、路径。 1 #id方式 两种方式,可以在前面加上tag名称,也可以不加 driver.find_element_by_css_select
阅读全文
摘要:#coding:utf-8 from selenium import webdriver driver = webdriver.Chrome() driver.get("http://bj.ganji.com/") h = driver.current_window_handle print(h) driver.find_element_by_link_text("招聘求职").click()...
阅读全文
摘要:1.Simple operation (1). Click() (2). Clear() (3). Send_Keys() 2. Submit the form submit() 3.Keyboard operation from selenium.webdriver.common.keys imp
阅读全文
摘要:http://www.cnblogs.com/yoyoketang/p/6128636.html
阅读全文
摘要:1.swith to ifram driver.switch_to.frame(driver.find_element_by_id("z_hppm_iframe")) 2.go back to the normal pge driver.switch_to.default_content()
阅读全文
摘要:1.find_element_by_id() 2.find_element_by_name() 3.find_element_by_class_name() 4.find_element_by_tag_name() 5.find_element_by_link_text() 6.find_eleme
阅读全文
摘要:1. from selenium import webdriver 2. open the browser: webdriver.IE() webdriver.Chrome() 3.Set hibernation time import time time.sleep(4) webdriver.im
阅读全文
摘要:一、Python 1. Download and install the python2.7.13(Note: It's best not to install in the C driver): https://www.python.org/57 2. Confiugre the Environm
阅读全文