The Xpath i get using the Selenium IDE is as follows:
xpath=(//a[contains(text(),'Add to cart')])[5] xpath:link
//a[contains(@href, '/?add-to-cart=85')] xpath:href
//li[5]/div/a xpath:position
I am using the following code to click the button:
WebElement ele = driver.findElement(By.xpath("//a[(@href= '/ecommerce/?add-to-cart=85')]"));
ele.click();

New Topic/Question
Reply


MultiQuote


|