Page 1 of 1

FluentAutomation This framework can be used with Selenium

Posted: Thu Feb 13, 2025 5:28 am
by sujonkumar6300
WebDriver or WatiN, which allows us to perform tests with different browsers and devices. We have chosen this tool for its flexibility and because it already includes in its API the ability to easily implement the PageObject pattern. In this article we are not going to go into all the features of this framework, for which I recommend the reader to review its documentation. Continuing with our example, we present the page model written in C#:



Let's analyze this code a bit before moving on. First, let's talk about the TestCase object thailand phone number data which is static, but its property values ​​are read from our data source. For this example, we used an XML file, but another source could be used (database, JSON, CSV, etc.), this allows us to run the tests in different environments (local, test instance, pre-production) or different users.

The SalesLoginElements object is a resource (*.resx file) in which we maintain the list of selectors, as we mentioned above. This list allows us to facilitate the maintenance of tests when there are changes on the page, and can even be shared with the web application.

SalesLoginPage and SalesHomePage are models that inherit from PageObject. Here we have used the convention of naming the actions that we can perform on the page with lowercase letters, this can be seen in the original test and is only a nomenclature to differentiate these actions from the DSL's own functions (I, And, etc.).