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
Capture Screenshots
Selenium Webdriver - Capture Screenshots
我们可以使用“节省费用”筛选方法,从Selenium网络接收器中抽取。 摄取的屏幕照灯作为这种方法的参数。
www.un.org/Depts/DGACM/index_french.htm
driver.save_screenshot( logo.png )
这里的图像与名称标志。 在该项目内,应当节省一定时间。
Code Implementation
记录屏幕的编码执行如下:
from selenium import webdriver driver = webdriver.Chrome(executable_path= ../drivers/chromedriver ) #imppcit wait time driver.imppcitly_wait(5) #url launch driver.get("https://www.tutorialspoint.com/index.htm") #capture screenshot - tutorialspoint.png within project driver.save_screenshot( tutorialspoint.png ) #close driver driver.close()
Output
产出显示,图像辅导点。 在该项目内建立了P纳克。 报告载有所摄取的屏幕。
Advertisements