I am using switch_to_windows() command for printing the title, but it doesn't print the title in Selenium web driver
Below is the code:
for handle in browser.window_handles:
print "Handle = ",handle
browser.switch_to_window(handle);
element = browser.find_element_by_tag_name("title")
print element.get_attribute("value")
I am getting the following output
Handle = {564f8459-dd20-45b8-84bf-97c69f369738}
None
Handle = {85338322-5e58-4445-8fe3-3e822d5a0caf}
None
After getting the handle I switch to the window and want to print the title. But I not seeing any title. When I see the HTML page I see the title tag there but not able to get it here.