RE: Locating a button not working


I attempt to locate this button “Place Order” using  XPath and other locating format but it does not work.

WebElement click = driver.findElement (By.xpath(“/html/body/div[2]/div/div[7]/div/form/section/fieldset[1]/div/div[2]/div/input”));;

jbfannie Train Asked on December 2, 2014 in Selenium WebDriver.

Normally Xpath Start WIth    //

on December 2, 2014.

Here is another code I tried to use…

WebElement PlaceOrderDiv = driver.findElement (By.className(“summary”));
//WebElement checkoutForm = checkoutDiv.findElement(By.tagName(“form”));
WebElement PlaceOrderButton = PlaceOrderDiv.findElement(By.tagName(“input”));;

Nothing happens. No error come up. This make sit more difficult..

on December 2, 2014.
Add Comment
3 Answers

Hi Jbfannie,

Try with the following 🙂

driver.findElement(By.linkText(“Place Order”)).sendKeys(Keys.ENTER);

DP Rao

Default Answered on December 3, 2014.
Add Comment

Your Answer

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