All Projects → yandex-qatools → Htmlelements

yandex-qatools / Htmlelements

Licence: other
Html Elements is a Java framework providing easy-to-use way of interaction with web-page elements in web-page tests.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Htmlelements

Atata
C#/.NET test automation framework for web
Stars: ✭ 362 (+40.31%)
Mutual labels:  framework, selenium, webdriver, selenium-webdriver
Thirtyfour
Selenium WebDriver client for Rust, for automated testing of websites
Stars: ✭ 191 (-25.97%)
Mutual labels:  selenium, webdriver, selenium-webdriver
PWAF
Python Webdriver Automation Framework
Stars: ✭ 37 (-85.66%)
Mutual labels:  webdriver, selenium, selenium-webdriver
Steward
PHP libraries that makes Selenium WebDriver + PHPUnit functional testing easy and robust
Stars: ✭ 215 (-16.67%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Marionette
Selenium alternative for Crystal. Browser manipulation without the Java overhead.
Stars: ✭ 119 (-53.88%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Java.webdriver
Browser test automation using Selenium WebDriver in Java
Stars: ✭ 135 (-47.67%)
Mutual labels:  selenium, webdriver, selenium-webdriver
page-modeller
⚙️ Browser DevTools extension for modelling web pages for automation.
Stars: ✭ 66 (-74.42%)
Mutual labels:  webdriver, selenium, selenium-webdriver
Java.appium
Mobile test automation using Appium in Java
Stars: ✭ 59 (-77.13%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Seleniumwithcucucumber
In this project we will discuss working Selenium with cucumber
Stars: ✭ 104 (-59.69%)
Mutual labels:  framework, selenium, webdriver
atata-kendoui
A set of Atata components for Kendo UI
Stars: ✭ 17 (-93.41%)
Mutual labels:  webdriver, selenium, selenium-webdriver
Csharp.webdriver
Browser test automation using Selenium WebDriver in C#
Stars: ✭ 115 (-55.43%)
Mutual labels:  selenium, webdriver, selenium-webdriver
google-meet-bot
Bot for scheduling and entering google meet sessions automatically
Stars: ✭ 33 (-87.21%)
Mutual labels:  webdriver, selenium, selenium-webdriver
Webdriverextensions
Make your WebDriver based Selenium tests more readable, reusability and maintainable by using WebDriver Extensions!
Stars: ✭ 89 (-65.5%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Webium
Webium is a Page Object pattern implementation library for Python (http://martinfowler.com/bliki/PageObject.html). It allows you to extend WebElement class to your custom controls like Link, Button and group them as pages.
Stars: ✭ 144 (-44.19%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Cabbie
WebDriver for the masses
Stars: ✭ 70 (-72.87%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Panther
A browser testing and web crawling library for PHP and Symfony
Stars: ✭ 2,480 (+861.24%)
Mutual labels:  selenium, webdriver, selenium-webdriver
E2e Experiment
A demo project with Spring Boot / Angular application and e2e tests
Stars: ✭ 9 (-96.51%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Marionette client
Mozilla's Gecko Marionette client in golang
Stars: ✭ 21 (-91.86%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Cdp4j
cdp4j - Chrome DevTools Protocol for Java
Stars: ✭ 232 (-10.08%)
Mutual labels:  selenium, webdriver, selenium-webdriver
Selion
Enabling Test Automation in Java
Stars: ✭ 252 (-2.33%)
Mutual labels:  framework, selenium, webdriver

Html Elements framework

release Maven Central

This framework is designed to provide an easy-to-use way of interacting with web-page elements in your tests. It can be considered to be an extension of WebDriver Page Object.

With the help of the Html Elements framework you can group web-page elements into blocks, encapsulate logic of interaction within them and then easily use created blocks in page objects. It also provides a set of helpful matchers to use with web-page elements and blocks. See JavaDocs and Samples for more details.

You can ask your questions on StackOverflow with the htmlelements tag.

Other Languages

In case you are not a Java guy/gal, don't panic, there are still few options:

Release Notes

Include Html Elements in your project

Maven dependencies for Html Elements core:

<dependency>
    <groupId>ru.yandex.qatools.htmlelements</groupId>
    <artifactId>htmlelements-java</artifactId>
    <version>1.19</version> <!-- 1.18+ is SELENIUM 3.5.1+ compatible -->
</dependency>

And for Thucydides integration:

<dependency>
    <groupId>ru.yandex.qatools.htmlelements</groupId>
    <artifactId>htmlelements-thucydides</artifactId>
    <version>1.19</version>
</dependency>

Or you can include all modules at once if needed:

<dependency>
    <groupId>ru.yandex.qatools.htmlelements</groupId>
    <artifactId>htmlelements-all</artifactId>
    <version>1.19</version>
</dependency>

Since 1.15 Java 8 is required. Please use 1.14 for Java 7 support.

Create blocks of elements

For example, let's create a block for the search form on the page http://www.yandex.com:

@Name("Search form")
@FindBy(xpath = "//form")
public class SearchArrow extends HtmlElement {

    @Name("Search request input")
    @FindBy(id = "searchInput")
    private TextInput requestInput;

    @Name("Search button")
    @FindBy(className = "b-form-button__input")
    private Button searchButton;

    public void search(String request) {
        requestInput.sendKeys(request);
        searchButton.click();
    }
}

Construct page object using created blocks

You can easily use created blocks in page objects:

public class SearchPage {

    private SearchArrow searchArrow;
    // Other blocks and elements here ...

    public SearchPage(WebDriver driver) {
        PageFactory.initElements(new HtmlElementDecorator(new HtmlElementLocatorFactory(driver)), this);
    }

    public void search(String request) {
        searchArrow.search(request);
    }

    // Other methods here ...
}

Use page objects in your tests

Created page objects can be used in your tests. This makes tests more concise, easier to maintain, and easy to write.

public class SampleTest {

    private WebDriver driver = new FirefoxDriver();
    private SearchPage searchPage = new SearchPage(driver);

    @Before
    public void loadPage() {
        driver.get("http://www.yandex.com");
    }

    @Test
    public void sampleTest() {
        searchPage.search("yandex");
        // Some assertion here
    }

    @After
    public void closeDriver() {
        driver.quit();
    }
}

Questions?

In case you can't find an answer in documentation and examples provided above, you can ask it on StackOverflow with the htmlelements tag.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].