RE: In the e-commerce demo website provided for automation I am facing problem in locating Continue button present on the page. As far as I know I have tried every possible way to locate that element but each time it is failing to locate. What can I do now?

RE: In the e-commerce demo website provided for automation I am facing problem in locating Continue button present on the page. As far as I know I have tried every possible way to locate that element but each time it is failing to locate.  What can I do now?


@Test

public void continueToCheckout() throws NoSuchElementException, InterruptedException, AWTException {
element = driver.findElement(By.xpath("//*[@id='checkout_page_container']/div[1]/a/span"));

element.submit();
/* //By classname

element = driver.findElement(By.className("step2"));

WebElement e2;

e2 = element.findElement(By.cssSelector("span"));

e2.click();
//  By linkText

driver.findElement(By.linkText("Continue")).submit();

*/

}

Above is the screenshot of the page containing “Continue” element with which I am facing issue and also my code for automation.  The error which is shown on console is “Unable to find element (whatever)” and “The server did not provide any stacktrace information.”

Ruchi Default Asked on July 18, 2016 in Selenium WebDriver.
Add Comment
3 Answers

hi ruchi

try explicit  wait

Default Answered on September 1, 2016.
Add Comment

Your Answer

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