This repository uses to demo how to run automation test using Selenium and Selenium Grid.
Note: Before you run into this example, make sure you install Docker and docker-compose.
- Run
docker-compose up
to install all neccessary resource. - Go to
C:\Windows\System32\drivers\etc
and add a row tohost
file like this
[YOUR_IP_ADDRESS] testserver.local
- Goes to
Automation.Test\Automation.Test.Sample Uses
directory and run dotnet commanddotnet test
to execute the test.
- In
Automation.Test.Sample
project, create your test page inherit fromPageBase
andIPageObject
. This includes all web element and all method of your page. - Open
Pages.cs
then add your page object to this class. This is a wrapper class includes all test page object of your website. - Create your scenario class inherit from
IClassFixture<SampleFixture>
then define your test case. Note: You can create your own (Fixture)[https://xunit.net/docs/shared-context] class.