- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
driver.execute_script('history.go') javaS = "window.location = 'https://www.tutorialspoint.com/index.htm'" driver. execute_script(javaS)
javas = "document.getElementsByName('user-search').click();" driver.execute_script(javas)
Please note, we have used getElementsByName('user-search'). The functions like getElementsByName and getElementsById return an array of matching elements. So for locating the first element, the index is used. However if we are using getElementById function, we need not use the index since only one matching element is referred there.
userN= driver.find_element_by_id("user-search']") driver.execute_script("arguments.click();", userN)
print driver.execute_script('return document.title')
- How to perform back and refresh in a browser in Selenium with python?
- How to close a browser session in Selenium with python?
- How to refresh a page in Firefox?
- How to check a checkbox in a page in Selenium with python?
- Save a Web Page with Python Selenium
- How to select a radio button in a page in Selenium with python?
- How to navigate back to current page from Frame in selenium webdriver?
- How to refresh a webpage using Python Selenium Webdriver?