摘要: 1 # -*- coding:utf-8 -*- 2 """ 3 iframe 处理 4 """ 5 6 from selenium import webdriver 7 8 driver = webdriver.Ie() 9 driver.get(r'F:\电子书\selenium\Selenium Testing Tools Cookbook(中文)\demo\iframe\iframe.html')10 #首先定位父窗11 driver.switch_to_frame('left')12 #获得 阅读全文
posted @ 2013-07-14 23:21 Roger| 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1 # -*- coding:utf-8 -*- 2 """ 3 通过 id 或 name 识别处理 fram 框架 4 """ 5 6 from selenium import webdriver 7 8 driver = webdriver.Firefox() 9 driver.get(r'F:\电子书\selenium\Selenium Testing Tools Cookbook(中文)\demo\frame\frame.html')10 driver.switch_to_frame('left' 阅读全文
posted @ 2013-07-14 22:46 Roger| 阅读(334) 评论(0) 推荐(1) 编辑
摘要: 1 # -*- coding:utf-8 -*- 2 """ 3 百度登录,退出 4 """ 5 from selenium import webdriver 6 import unittest 7 from selenium.webdriver import ActionChains 8 from selenium.webdriver.support.ui import WebDriverWait 9 10 class Baidu_Demo(unittest.TestCase):11 12 def setUp(self):13 se 阅读全文
posted @ 2013-07-14 02:02 Roger| 阅读(740) 评论(0) 推荐(0) 编辑