随笔分类 -  Selenium+Python

摘要:打开Pycharm->Settings->Project Interpreter, 选择Add 阅读全文
posted @ 2018-05-24 11:06 Linazhu 阅读(109) 评论(0) 推荐(0) 编辑
摘要:1. 打开pycharm>点击File>点击setting>打开Plugins>点击Browse reponsitories: 2. 打开后,输入IntelliBot并安装,安装后需要重启才能生效. 3.此时打开脚本,会发现不支持.txt的文件,此时需要对pycharm进一步设置 点击File>点击 阅读全文
posted @ 2018-05-24 10:12 Linazhu 阅读(3908) 评论(0) 推荐(0) 编辑
摘要:python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'的解决方法: Import HTMLTestRunner 1.原因是官网的是python2语法写的,看官手动把官网的HTMLTestRunner.py改成python3 阅读全文
posted @ 2018-04-23 14:11 Linazhu 阅读(474) 评论(0) 推荐(0) 编辑
摘要:css_selector定位详解 driver.find_element_by_css_selector() css定位可以分为四类:id、class、其他属性、路径。 1 #id方式 两种方式,可以在前面加上tag名称,也可以不加 driver.find_element_by_css_select 阅读全文
posted @ 2018-04-18 22:22 Linazhu 阅读(2549) 评论(0) 推荐(0) 编辑
摘要:#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()... 阅读全文
posted @ 2017-06-02 17:37 Linazhu 阅读(211) 评论(0) 推荐(0) 编辑
摘要:1.Simple operation (1). Click() (2). Clear() (3). Send_Keys() 2. Submit the form submit() 3.Keyboard operation from selenium.webdriver.common.keys imp 阅读全文
posted @ 2017-05-16 15:16 Linazhu 阅读(131) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/yoyoketang/p/6128636.html 阅读全文
posted @ 2017-05-08 18:02 Linazhu 阅读(141) 评论(0) 推荐(0) 编辑
摘要: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() 阅读全文
posted @ 2017-05-08 17:59 Linazhu 阅读(105) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2017-05-08 17:56 Linazhu 阅读(131) 评论(0) 推荐(0) 编辑
摘要:1. from selenium import webdriver 2. open the browser: webdriver.IE() webdriver.Chrome() 3.Set hibernation time import time time.sleep(4) webdriver.im 阅读全文
posted @ 2017-05-08 17:54 Linazhu 阅读(149) 评论(0) 推荐(0) 编辑
摘要:一、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 阅读全文
posted @ 2017-04-24 17:07 Linazhu 阅读(173) 评论(0) 推荐(0) 编辑