Unable to click a button/link in Light box

45 views
Skip to first unread message

kamal

unread,
Sep 27, 2011, 9:51:11 AM9/27/11
to Selenium - Automated Software Testing
Hi friends,

I am using chrome web driver. I want to click a button/link in a light
box of my applications. I was tried with 3 options , where it is not
working for me.

Can anyone pls help me out from this issue.
My code is something looks like below:

System.out.println(selenium.getAllWindowTitles());
selenium.selectWindow(selenium.getAllWindowTitles()[0]);
System.out.println(selenium.getTitle());
WebElement h = driver.findElement(By.xpath("/html/body/div[2]/div/
div[3]/div/form/div/a/span"));
h.click();
//selenium.click("//a[@id='srAgreeTerms']/span");

I tired with id also. it is not helping. Please give me some solution
on it

Thanks,
Kamal...
Reply all
Reply to author
Forward
0 new messages