Selenium Flashcards
1
Q
Selenium: To switch the tab you are controlling, type
A
my_browser.switch_to_window(my_browser.window_handles[1])
2
Q
Selenium: To open a new blank tab, type
A
my_browser.execute_script(‘'’window.open(“about:blank”, “_blank”);’’’)
3
Q
Selenium: The most robust way to find elements it
A
my_browser.find_element_by_css_selector(“#id”)