Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>the best way (IMHO) is to use fluent wait. Anyway you have locators of the needed element (xpaths, or css selectors or etc.) and passing locators to fluentWait function you'll obtain needed web elements to interact with. <code>fluentWait</code> function code provided below:</p> <pre><code>public WebElement fluentWait(final By locator){ Wait&lt;WebDriver&gt; wait = new FluentWait&lt;WebDriver&gt;(driver) .withTimeout(30, TimeUnit.SECONDS) .pollingEvery(5, TimeUnit.SECONDS) .ignoring(NoSuchElementException.class); WebElement foo = wait.until( new Function&lt;WebDriver, WebElement&gt;() { public WebElement apply(WebDriver driver) { return driver.findElement(locator); } } ); return foo; } ; </code></pre> <p>it is important to note that <em>each FluentWait instance defines the maximum amount of time to wait for a condition, as well as the frequency with which to check the condition. Furthermore, the user may configure the wait to ignore specific types of exceptions whilst waiting, such as NoSuchElementExceptions when searching for an element on the page.(c)selenium API documentation</em></p> <p>So you can set<br> <em>.pollingEvery(1, TimeUnit.SECONDS)</em><br> and during this interval will be verified wheter your AJAX has returned or not.</p> <p>some add info about fluent wait you can read <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/support/ui/FluentWait.html" rel="nofollow">here</a></p> <p>Assume </p> <pre><code>String cssLocator=...blablabla.. // is the css of the table row </code></pre> <p>you pass to the function:</p> <pre><code> WebElement firstRow= fluentWait(By.cssSelector(cssLocator)); </code></pre> <p>and in this way you obtain first row of your table.</p> <p>Hope this got clear to you now)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload