Accelerate Test Creation
To speed up the CI process, we developed a group of features that support every phаse of the process, from test creation to execution. Let’s take a look how BELLATRIX can speed up your test creation by providing element snippets, handy elements locators, smart wait for the elements, more than 150 additional elements actions, ready-to-go templates and much more.
API Usability- Locate Elements
Additional methods and ability to add custom locators.
For example, in WebDriver to find an element, we use the FindElement method while specifying the locator through By class.
WebDriver Example
IWebElement agreeCheckBox = driver.FindElement(By.Id("agreeChB"));
agreeCheckBox.Click();
However, this syntax requires additional effort. It is not fluent since you had to begin a new “chain” using the By static class. Also, it is not extendable if you want to add custom locators.
BELLATRIX Example
var textField = App.ElementCreateService.CreateByIdContaining<TextField>("edit");
BELLATRIX provides you with a CreateBy method for each locator. Everything follows the natural writing flow, leveraging to the maximal degree on IntelliSense. If you add your custom locator, your method will appear as well.
One of the coolest things that the BELLATRIX element includes, is the By property (knowing how it was located).
API Usability- Wait for Elements
Smart wait for elements that will solve 80% of all use cases.
All elements are internally waited to exist before usage. This solves 80% of all use cases. After that as part of the CreateBy API, we added additional ToBe methods which you can chain. Which means you can specify an unlimited number of conditions for each element that needs to be fulfilled before the element is returned.
Example
var button = App.ElementCreateService.CreateByIdContaining<Button>("button").ToBeClickable().ToBeVisible();
button.Click();
BELLATRIX comes with 7 default ToBe methods.
- ToExists
- ToNotExists
- ToBeVisible
- ToNotBeVisible
- ToBeClickable
- ToHasContent
- ToBeDisabled
Moreover, it is relatively easy to add your custom ToBe methods if needed.
150+ Additional Elements Actions
BELLATRIX saves you a lot of effort and code with extended elements and services APIs.
BELLATRIX exposes 18+ Android controls. Each of them includes only the actions that you should be able to do with the specific control and nothing more.
var button = App.ElementCreateService.CreateByName<Button>("button");
button.Click();
var calendar = App.ElementCreateService.CreateByAutomationId<Calendar>("calendar");
Assert.AreEqual(false, calendar.IsDisabled);
var checkBox = App.ElementCreateService.CreateByName<CheckBox>("checkBox");
checkBox.Check();
Assert.IsTrue(checkBox.IsChecked);
var password = App.ElementCreateService.CreateByAutomationId<Password>("passwordBox");
password.SetPassword("topsecret");
The most important attributes of each Android control are included, as well as their assertion alternatives.
var label = App.ElementCreateService.CreateByName<Label>("Result Label");
Assert.IsTrue(label.IsPresent);
Assert.AreEqual("Meissa Is Beautiful!", textField.InnerText);