initial startup project for selenium tests
.Net Core 2.2 XUnit Selenium
You must select a build configuration (See Step 8)
There are no tests out of the box, you must create your own (See Step 5,6,7) Inherit from UITestBase for easier support Remember to use the attribute [Fact] or [Theory] for tests to be detected.
I have created web drivers for IE, Firefox and Chrome.
After cloning the repo, you can either just use the already created packaged zip (recommended) or create a project template from the project. Once you have a zip file you can then drop this in the Visual Studio Template Project Folder.
Start Visual Studio (visual studio must be restarted to detect changes) Select to start a new project and use the search bar to search for "Selenium"
You will now be presented with a blank project with all the required nuget packages required for Selenium tests. There is also a skelaton structure setup with base code to instantiate web drivers.
To get started, just create a new code file
Then write your first test (ensure to inherit from UITestBase)
Before it will compile, you must select the browser you wish to use. This is done using Build Configurations.
Navigate to the Test Explorer, this will list all tests within the project/solution.
If nothing is showing, ensure you have tagged all your test methods with either [Fact] or [Theory]
Run the test and see what happens. A browser instance should be started by the Selenium framework and test gets executed. Results of test shown in the test explorer
After debugging tests (using the same context menu to run tests), spotted that the text is empty for input control. Changed to use GetAttribute method of Value and then re-ran the tests.