- 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
Is navigate method available in Selenium Webdriver with Python?
The navigate method is not available in Selenium webdriver with Python.
In order to navigate to a page, we can use the get method and pass the URL of the page that we want to launch as a parameter.
In this method the webdriver waits till the webpage is completely loaded prior transferring the control to the next step in the test case. If the page that we are trying to load, has multiple AJAX calls after loading, then the webdriver becomes unaware when the page will ultimately load.
We can use the different wait methods in synchronization to handle such a scenario. Also, once a page is navigated, we can verify its URL, with the help of the current_url method.
driver.get("https://www.tutorialspoint.com/index.htm"); s = driver.current_url
from selenium import webdriver #set chromodriver.exe path driver = webdriver.Chrome(executable_path="C:\chromedriver.exe") #implicit wait driver.implicitly_wait(0.5) #maximize browser driver.maximize_window() #navigate a page driver.get("https://www.tutorialspoint.com/index.htm") #obtain current URL print("Page Url:") print(driver.current_url) #navigate another page driver.get("https://www.tutorialspoint.com/about/about_careers.htm") #obtain current URL print("Second Page Url:") print(driver.current_url) #browser quit driver.quit()
- How to navigate back to current page from Frame in selenium webdriver?
- How install Selenium Webdriver with Python?
- Wait until page is loaded with Selenium WebDriver for Python.
- Running Selenium Webdriver with a proxy in Python.
- What is WebDriver in Selenium?
- What are the various waits available in Selenium with python?
- Describe some of the exceptions available in Selenium with python?
- Selenium WebDriver With Java Quickstart.
- Maximize WebDriver (Selenium 2) in Python.
- How to take partial screenshot with Selenium WebDriver in python?
- What are assertions available to test relational comparisons in Selenium with python?
- Running Selenium WebDriver python bindings in chrome.
- Selenium RC vs Selenium webdriver.
- Selenium WebDriver StaleElementReferenceException.
- How to get selected option using Selenium WebDriver with Python?