Selenium Webdriver Tutorial
Selected Reading
- Selenium WebDriver - Discussion
- Selenium WebDriver - Useful Resources
- Selenium WebDriver - Quick Guide
- Double Click
- Right Click
- Capture Screenshots
- Scroll Operations
- Chrome WebDriver Options
- JavaScript Executor
- Select Support
- Wait Support
- Headless Execution
- Executing Tests in Multiple Browsers
- Handling Checkboxes
- Read/Write data from Excel
- Generating HTML Test Reports in Python
- Color Support
- Handling Edit Boxes
- Handling Links
- Alerts
- Windows
- Drag and Drop
- Forms
- Create a Basic Test
- Action Class
- Exceptions
- Cookies
- Backward and Forward Navigation
- Pop-ups
- Explicit and Implicit Wait
- Identify Multiple Elements
- Identify Single Element
- Browser Navigation
- Installation
- Introduction
- Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Headless Execution
Selenium Webdriver - Headless Execution
ium支持无情处决。 在 Chrome浴器中,可以在 Chrometions树类的帮助下执行无头处决。 我们必须制造这一类的物体,并采用添加方式。 最后,通过该参数——没有这种方法。
让我们获得标题——关于图里斯点的职业——以无头方式发射的网页的地图——
Code Implementation
无头执行守则如下:
from selenium import webdriver from selenium.webdriver.chrome.options import Options #object of Options class c = Options() #passing headless parameter c.add_argument("--headless") #adding headless parameter to webdriver object driver = webdriver.Chrome(executable_path= ../drivers/chromedriver , options=c) # imppcit wait time driver.imppcitly_wait(5) # url launch driver.get("https://www.tutorialspoint.com/about/about_careers.htm") print( Page title: + driver.title) # driver quit driver.quit()
Output
产出显示了这一信息——退出代码0的过程意味着上述雷达法成功执行。 此外,申请的页标题(从司机处获得)。 标题方法——图兰斯角的职业——图西里点的印刷版。
Advertisements