i have to automate this page using java
,and selenium
.
I must click on the link which has label terms and conditions
it shows up a box, and then i need to navigate it down, and click on Agree button.
I have already tried:
driver.click("//*[@id=\"field_terms\"]/td[2]/div/div/label[1]/a"); // Click on the link
it opens the box for me, but i stuck after it.
I have 2 problems:
- How to scrol down the pop up?
- How to click on the Agree button?
Update:
Regarding the scroll problem i used the below method which does not work:
public void scrollDown() {
JavascriptExecutor jsx = (JavascriptExecutor)driver;
jsx.executeScript("arguments[0].scrollTop = arguments[1];","window.scrollBy(0,450)", "");
}