Created
April 20, 2018 13:54
-
-
Save christophervigliotti/03021c79a5ae6f6dfd79c5b385532a8b to your computer and use it in GitHub Desktop.
AFT Working With Popups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a_popup_window = window_opened_by do | |
# click_button 'Open Login Window', which opens a popup | |
the_xpath = "//a[@id='open_popup_link']" | |
find(:xpath, the_xpath).click | |
end | |
within_window(a_popup_window) do | |
# are we focused on the popup? | |
expect(page).to have_selector(:xpath, "//h1[contains(text(), 'Text that appears in the H1 Tag')]") | |
popup_page_instance = PopupPageObj.new | |
popup_page_instance.do_a_thing | |
popup_page_instance.do_another_thing | |
# fill_in :email, with: "email@example.com" | |
# fill_in :password, with: "password" | |
# click_button 'Log In' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment