Changes

Jump to navigation Jump to search
Notes on build a Selenium Web Driver:
In your python script:
*Make sure that you properly set the chromedriver path if you don't have it under root. For example: webdriver.Chrome("/Users/adriansmart/PycharmProjects/SeleniumTest/chromedriver")
*Use driver.find_element_by_xpath to locate select the element on html page*To get . You will need to enter the xpath from html, in this function so first load the websitein a browser.*Right Next, right click on the page element you want the xpath and select inspect. This will launch the html inspector and highlight the relevant lines of code
*Right click on what looks like the right piece of code and select "Copy xpath data"
*Paste that stuff in your python script where it asks for a path, For example: driver.find_element_by_xpath("//*[@id='solr-print-dropdown-button']")

Navigation menu