java - how can I make the webdriver click on element as soon as it is clickable , instead of loading of entire page? -


The "Register as a new user" link text appears on the home page, as soon as the WebDriver gets (driver. Get). But still it waits to load for the full page to be executed below the line.

  driver.findelement (By.linkText ("Register as new user")). Click ();   

How could it be possible to click on the WebDriver element as it appears on the page, if any element is visible to other elements or not? I am using: Java, Ubuntu

I'm not sure if the untruth waits After completely opening a URL the page is completely Waiting for the driver until the load, but it is clearly trying to wait. In the code below, the driver has to wait until the element becomes clickable and clicks on it. If the element is not clickable in the specified time (in the example below it is set to 30 seconds) then the driver throws timeout exception .

  WebDriverWait wait = new WebDriverWait (driver, unit in 30 / second seconds); Wait.until (required conditions. ElementtoBabelable (By.linkText ("Register as new user").) Click ();    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -