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
Double Click
Selenium Webdriver - Double Cpck
ium可以在行动帮助下进行 mo变运动、主要新闻、对元素的 h、双重点击、拖拉和退步行动。 链式班。 这种方法双轨制成一个元件。
The syntax for using the Double Point is as:
double_cpck(e=None)
这里,即是双重点击的要素。 如无提及,则点击目前停用的位置。 我们必须从 se中补充这一发言。 网上进口行动与“行动任务”类别合作。
让我们对以下要素进行双重点击:
在上述图像中,我看到,在把双点点点击时,我! 纽州产生了警示箱。
Code Implementation
使用双点击的代码如下:
from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.alert import Alert driver = webdriver.Chrome(executable_path= ../drivers/chromedriver ) #imppcit wait time driver.imppcitly_wait(5) #url launch driver.get("http://www.uitestpractice.com/Students/Actions") #identify element s = driver.find_element_by_name("dblCpck") #object of ActionChains a = ActionChains(driver) #right cpck then perform a.double_cpck(s).perform() #switch to alert alrt = Alert(driver) # get alert text print(alrt.text) #accept alert alrt.accept() #driver quit driver.quit()
Output
产出显示了这一信息——退出代码0的过程意味着上述雷达法成功执行。 此外,警示文本——双射弹! 页: 1 两点点点击双筒点击我造成的警钟! 纽伦。
Advertisements