0

Use this url--http://www.indiangiftsportal.com/product_info.php?products_id=kaju-kalash-shivaaz,

then click add To cart, it will show you one popup window in that am not getting how to click that "enter image description here"skip" button.

Any ideas?

2
  • 1
    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, 2014 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, 2014 at 4:48

2 Answers 2

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

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 !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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