1.浏览器中加载URL:
driver.get('http://www.new-dream.net/')
2.浏览器最大化:
driver.maximize_window()
3.浏览器最小化:
driver.minimize_window()
4.自定义浏览器窗口大小:
driver.set_window_size(200,200)
5.刷新:
driver.refresh()
6.返回上一页:
driver.back()
7. 向前进一页:
driver.forward()
8.截图:
driver.get_screenshot_as_file("c:\\test.bmp”)
9.获取当前页的URL:
driver.current_url
10.获取当前页面的title:
driver.title
11.获取页面源代码:
driver.page_source
12.关闭当前tab页面:
driver.close()
13.退出当前driver:
driver.quit()