Hello dear Stackoverflowers.
I'm having some seriously insanely annoying trouble with my capybara test. It seems to have a mind of its own and will sometimes decide to run with zero issue and sometimes decide to not find elements, click anything and generally just suck. I have no idea why this is.
I've been researching for days trying to find sure up my logic, find the 'best' ways of finding and clicking elements or filling in fields and haven't gotten any further. Please help, if I still had hair I would be pulling it out.
Also I'm using the Selenium Web Driver. All gems are up to date.
Thanks in advance.
It will randomly decide to not click on 'Amtrak 1234' and sometimes entirely miss the find('#atedrop4').click or will decide to click elements not even close being specified in my test. I'm very confused.
click_link 'Amtrak 1234'
find('#atedrop4').click
find('.ategoogle').click
new_window=page.driver.browser.window_handles.last
page.driver.browser.switch_to.window(new_window) do
expect(page).to have_content "evan@tripwing.com"
page.driver.browser.close
end
click_link 'Amtrak 1234'
click_link 'Sixt Autoverhuur'
find('#atedrop7').click
find('.ategoogle').click
new_window=page.driver.browser.window_handles.last
page.driver.browser.switch_to.window(new_window) do
expect(page).to have_content "evan@tripwing.com"
page.driver.browser.close
end
click_link 'Sixt Autoverhuur'
click_link 'Hotel 717'
find('#atedrop8').click
find('.ategoogle').click
new_window=page.driver.browser.window_handles.last
page.driver.browser.switch_to.window(new_window) do
expect(page).to have_content "evan@tripwing.com"
page.driver.browser.close
end
click_link 'Hotel 717'
click_link 'Car Transfer from 22 Wilson Ave, Brooklyn, NY 11237, USA'
find('#atedrop9').click
find('.ategoogle').click
new_window=page.driver.browser.window_handles.last
page.driver.browser.switch_to.window(new_window) do
expect(page).to have_content "evan@tripwing.com"
page.driver.browser.close
end
click_link 'Car Transfer from 22 Wilson Ave, Brooklyn, NY 11237, USA'
Aucun commentaire:
Enregistrer un commentaire