0

use this url--http://www.indiangiftsportal.com/product_info.php?products_id=kaju-kalash-shivaaz ,then click add To cart , it ll show you one popup window in that am not getting how to click that "enter image description here"skip" button please help me thank u in advance

  • Prasahnth, could you give us a bit more information? What's the code you're using to access the page? The code you've tried that isn't working? The page HTML/JavaScript? – Kate Paulk Feb 19 '14 at 12:06
  • am using HTML but when am click, right click of the mouse button it ll not showing option like view Xpth,inspect element with firebug "only for this above popup image page" thanks for giving ur valuable time – prasahnth Feb 20 '14 at 4:48
1

If the problem is not being able to click on the element because it's not visible you can use this method:

  public static void scrollToElement(WebElement element, WebDriver driver) {
    JavascriptExecutor jse = (JavascriptExecutor) driver;
    jse.executeScript("arguments[0].scrollIntoView(true);", element);
}

WebElement el = driver.findElement(By.cssSelector(".close"));
this.scrollToElement(el,driver);

Hope this helps

| improve this answer | |
0

Check this solution-

WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.indiangiftsportal.com/product_info.php?products_id=kaju-kalash-shivaaz"); 
driver.findElement(By.cssSelector("div#clickme input")).click();
driver.findElement(By.cssSelector("a.close")).click();

Hope this helps !

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.