RE: Help with ecommerce website and pop which says ‘Go to Checkout’ or ‘Continue Shopping’

Hi all.

I am new to all this. On the eCommerce website where I am assuming a pop up box appears which says ‘Go to Checkout’ or ‘Continue Shopping’ I cant get my tests to get pass this.

Is this JavaScript or a simple alert? Which locator do I use and how do I drive the web-driver to get pass this?

Are there answers for the eCommerce website somewhere?

Any help appreciated.

arifi Train Asked on November 27, 2015 in Selenium WebDriver.
Add Comment
5 Answers

Hi Virender,

Couldn’t get it working through the CSS. What i did was add a small sleep as you will see from the snippet below and it appears to have done the trick. Some sort of sync issue perhaps. Got lots to learn at the moment. Really appreciate the help so far.

driver.find_element(:link_text, “All Product”).click
driver.find_element(:link_text, “iPhone 5″).click
driver.find_element(:xpath,”//input[@value=’Add To Cart’]”).click

sleep 10
driver.find_element(:link_text, “Go to Checkout”).click
#’expect(driver.find_element(:tag_name, “body”).text).to include(“Checkout”)

Train Answered on November 29, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.