2017年4月8日

selenium+python之窗口切换

摘要: 1、获取当前窗口句柄:current_handle = driver.current_window_handle; 2、获取所有窗口句柄:all_handles = driver.window_handles; 3、切换到特定句柄窗口:driver.switch_to.window(handleNa 阅读全文

posted @ 2017-04-08 16:20 临风飞扬 阅读(173) 评论(0) 推荐(0) 编辑

selenium+python之操作元素

摘要: 一、键盘元素操作 1、导入Keys: from selenium.webdriver.common.keys import Keys 2、键盘操作 键盘F1到F12:send_keys(Keys.F1) 把F1改成对应的快捷键 复制Ctrl+C:send_keys(Keys.CONTROL,'c') 阅读全文

posted @ 2017-04-08 09:52 临风飞扬 阅读(141) 评论(0) 推荐(0) 编辑

导航