Selenium Flashcards

1
Q

Selenium: To switch the tab you are controlling, type

A

my_browser.switch_to_window(my_browser.window_handles[1])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Selenium: To open a new blank tab, type

A

my_browser.execute_script(‘'’window.open(“about:blank”, “_blank”);’’’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Selenium: The most robust way to find elements it

A

my_browser.find_element_by_css_selector(“#id”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly