Introduction
This is the client for Sirius platform responsible for Web applications interaction. It provides the communication channel to Sirius Server Web module as well as provides high-level API for making convenient page objects definition and general interaction with web application under test.
Project Documentation
Resource | Description |
---|---|
Project Documentation Home Page | The home page for generated Maven site containing major technical documentation for the module |
Project Reports Page | The home page for generated Maven site containing major analysis reports for the module |
Project Javadoc Page | The home page for generated Maven site containing major Javadoc documentation for the module |
Installation
The Sirius Web client library is delivered in 2 ways:
-
Self-contained Java library provided as jar file. It can be taken from downloads page. All we need to do is just unpack the archive and include appropriate jar file into the project.
-
Maven dependencies. Each client module is also published to Maven repository. The list of available modules can be found on the following page. So, if we have Maven project where we’d like to use Sirius Java client libraries we should update Maven script with the entry like this:
| <dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>sirius.client.web</artifactId>
<version>LATEST</version>
</dependency>
|
or any similar for all the modules we’d like to include.
Usage Sample
After that we can use library classes, e.g:
| import org.sirius.client.web.classes.Page;
import org.sirius.client.web.classes.WebButton;
import org.sirius.client.web.classes.WebEdit;
...
WebClient client = new WebClient();
|
In this example we’ve just initialized main entry point for Sirius Win32 API and after that we can make window declarations like:
| public class GoogleStart extends Page {
public WebEdit edtQuery = null;
public WebButton btnSearch = null;
public GoogleStart(WebClient client){
super(client);
edtQuery = new WebEdit(this,"name=q");
btnSearch = new WebButton(this,"name=btnG");
}
}
|
and then use them within the test code like:
| client.start(WebClient.HTMLUNIT);
GoogleStart main = new GoogleStart(client);
main.open("http://google.com");
main.edtQuery.type("Hello world!!!");
main.btnSearch.click();
|
Detailed information about Sirius Web client API usage can be found on the project wiki page where all major concepts are described.
Documentation
Releases
All available client modules can be found at the Maven repository.
Blog Links
Authors
Myk Kolisnyk (kolesnik.nickolay@gmail.com)