标签:
转:
新建实例driver = webdriver.Chrome()
1.获取当前页面的Url函数
方法:current_url
实例:
driver.current_url
2.获取元素坐标
方法:location
解释:首先查找到你要获取元素的,然后调用location方法
实例:
driver.find_element_by_xpath("//*[@id=‘tablechart‘]/tbody/tr[14]/td[9]").location
3.表单的提交
方法:submit
解释:查找到表单(from)直接调用submit即可
实例:
driver.find_element_by_id("form1").submit()
4.获取CSS的属性值
标签:
原文地址:http://www.cnblogs.com/saryli/p/4289601.html