On Sunday, 17 February 2013 20:24:30 UTC+5:30, Kwame Akuffo wrote:hi,
below is a code in red and the API's you may use as you wish.
WebDriverWait wait = new WebDriverWait(FireFoxDriver, 10);
WebElement element =
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className(“list-cnt”)));
- *visibilityOf*(WebElement element) – An expectation for checking
that an element, known to be present on the DOM of a page, is visible.
- *titleIs*(java.lang.String title) – An expectation for checking the
title of a page.
- *titleContains(java.lang.String title) - **An expectation for
checking that the title contains a case-sensitive substring*
- *textToBePresentInElementValue*(By locator, java.lang.String text) –
An expectation for checking if the given text is present in the specified
elements value attribute.
- textToBePresentInElement(By locator, java.lang.String text) – An
expectation for checking if the given text is present in the specified
element.
- stalenessOf(WebElement element) – Wait until an element is no longer
attached to the DOM.
- refreshed(ExpectedCondition<T> condition) – Wrapper for a condition,
which allows for elements to update by redrawing.
- presenceOfElementLocated(By locator) – An expectation for checking
that an element is present on the DOM of a page.
- presenceOfAllElementsLocatedBy(By locator) – An expectation for
checking that there is at least one element present on a web page.
- *not(ExpectedCondition<?> condition) - **An expectation with the
logical opposite condition of the given condition.*
- invisibilityOfElementWithText(By locator, java.lang.String text) –
An expectation for checking that an element with text is either invisible
or not present on the DOM.
- invisibilityOfElementLocated(By locator) – An expectation for
checking that an element is either invisible or not present on the DOM.
- frameToBeAvailableAndSwitchToIt(java.lang.String frameLocator) – An
expectation for checking whether the given frame is available to switch to.
- elementToBeSelected(WebElement element) – An expectation for
checking if the given element is selected.
- elementToBeSelected(By locator)
- elementToBeClickable(By locator) – An expectation for checking an
element is visible and enabled such that you can click it.
WebElement element =
wait.until(ExpectedConditions.elementToBeClickable(By.id(“someid”)));
Kwame Akuffo
kak...@curoonline.com <javascript:>
07891268149
On 17 Feb 2013, at 12:13, Pravin Shetty <pravi...@gmail.com <javascript:>>
wrote:
Hi,
Can body help me with some code if i want to wait for some element to
exist or load and then proceed execute further action.
i tried with
new WebDriverWait(driver,
5000).until(ExpectedConditions.presenceOfElementLocated(By.name("corrAddressFrst")));
driver.findElement(By.name("corrPinCode")).sendKeys("500500");
But its not working.
Thanks !!
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to selenium-user...@googlegroups.com <javascript:>.
To post to this group, send email to seleniu...@googlegroups.com<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msg/selenium-users/-/Z6tWdQYK0dcJ.For more options, visit
https://groups.google.com/groups/opt_out. You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.