Java selenium click element not working -


i want click load more link in page. code below.

pageurl="http://www.foundpix.com/category/actor/bollywood-actor/"  webdriver driver = new firefoxdriver();  driver.get(pageurl);  driver.manage().window().maximize();  javascriptexecutor jse = (javascriptexecutor) driver;  jse.executescript("window.scrollby(0,2500)", "");  webdriverwait wait = new webdriverwait(driver, 60);  wait.until(expectedconditions.visibilityofelementlocated(by.id("json_click_handler")));  driver.findelement(by.id("json_click_handler")).click(); 

how can make click link.

you can use below xpath click load more button both times:-

driver.findelement(by.xpath("//*[@id='blocks-left']/div/div[3]/div[contains(.,'load more')]")).click(); 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -