What will be the output for the below lines of code?

driver = webdriver.Chrome(executable_path="D \\chromedriver.exe")
driver.get("http://www.google.com")
driver.refresh()
driver.forward()
driver.get("http://lex.infosysapps.com")
driver.refresh()
driver.back()
windows=driver.window_handles
print(str(len(windows))+","+driver.current_url)

1, http://lex.infosysapps.com
1, http://www.google.com
2, http://www.google.com
2, http://lex.infosysapps.com
Verified Answer
Correct Option - b

To get all Infosys Certified Selenium with Python Automation Tester Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram