Test Automation For Web-Based Applications Portnov Computer School WebDriver Training Test Automation For Web-Based Applications Presenter: Ellie Skobel
Day 1 Selenium 3 (WebDriver)
WebDriver Basics Installation is Complete! Install selenium webdriver client: In PyCharm select Settings > Python Interpreter Click on the plus (+) icon to add an additional python package Search for 'selenium', select and click Install Installation is Complete! To use basic webdriver commands: In you python TestCase import webdriver from selenium import webdriver Create a webdriver browser instance self.driver = webdriver.Firefox() Use the object instance to find elements and perform actions self.driver.find_element_by_id("Submit").click()
Implementations of webdriver Firefox Opera Chrome IE Safari PantomJS Android ** iOS ** ** = via Appium
Basic WebDriver Commands Definition get opens a specified URL title returns the page title find_element_by_* returns first found matching element. Options include: id, tag_name, class_name, link_text, partial_link_text, css_selector, xpath and name find_elements_by_* returns ALL found matching elements. Options include: id, tag_name, class_name, link_text, partial_link_text, css_selector, xpath and name quit quits the browser session Webdriver API Documentation: here
Basic WebElement Commands Description text returns element's visible text click performs a single click submit submits a form (similar to pressing enter/return on the keyboard) clear clears all content from a field send_keys Simulates entering text into a field