This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Explicit Waits
Mariusz Kubiś edited this page Jul 14, 2016
·
4 revisions
Selenium reference: http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-waits
BobcatWait is enhanced version of WebDriverWait which is responsible for pausing the test until given condition is fulfilled. To use BobcatWait just inject it into your class.
@Inject
private BobcatWait wait;
Class contains expected conditions for URL, e.g.
wait.withTimeout(10).until(UrlExpectedConditions.pageUrlContains("/home"));
Class contains custom conditions for WebElements, e.g.
wait.withTimeout(10).until(CommonExpectedConditions.elementHasAttributeWithValue(menu, "class", "visible"));
Class contains expected conditions for JCR, e.g.
@Inject
private JcrAuthorUtils provider;
//..
bobcatWait.withTimeout(10).until(JcrExpectedConditions.nodeExist(provider.getSession(), "/content"));
@Inject
private WebDriver webDriver;
@Inject
private BobcatWait bobcatWait;
//..
bobcatWait.withTimeout(Timeouts.BIG).until(driver -> {
WebElement button = driver.findElement(By.className("my-button-class"));
return button.isEnabled();
}, 2);
- Configuring Bobcat
- Selenium enhancements
- Cucumber enhancements
- Traffic analyzer
- Email support
- Reporting
- Cloud integration
- Mobile integration
- Executing tests on different environments
- Working with multiple threads
- Tips and tricks
- Authoring tutorial - Classic
- AEM Classic Authoring Advanced usage
- Siteadmin
- Sidekick
- Aem Component
- Working with author pages
- Working with Publish pages
- Advanced component interactions
- Working with Context Menu
- Using Aem Content Tree
- Aem Content Finder
- Storing component configurations
- Working with packages
- Jcr Support
- Authoring tutorial - Touch UI
- Adding and editing a component
- Sites management tutorial