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
Scroll Operations
Selenium Webdriver - Scroll Operations
ium不能直接处理发生功能。 谷物可以在该方法的帮助下执行 Java式的指令——执行。 即将执行的贾瓦底指挥作为这一方法的一个参数。
The syntax for implementing the Javascript directation:
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
2. 方法编码 用于向浏览器窗户的一个地点倾斜。 薪金是一种要素的财产。 The document. person.scroll 浏览量产生网页的高度。
Code Implementation
执行 Java指令的守则如下:
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") #scroll to page bottom driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
Output
产出显示,该网页上下页。
Advertisements