- Initialize the web driver in a separate
class.
- Make auto implemented IwebDriver type
property.
- We can use this property in all the
other places thru out this project by simply calling “InitialiseAppium.driver”
- In another class find the elemenats using below mechanism.
- ·Create propertyes for all the elemant (text box, lable,button,dropdownlist) that you need to cominuicate / identify.
- ·Add attributes to find the elemant using Id,Name,Xpath or anyother mechanisam in the selenium.
User can maintain multiple class files
to locate elements in each and every web page in the project.
- In the same class write your test steps, including clicks, scrolls, enter text ..etc.
- Create another class file and write the test code with the relavant test attibutes ([TestFixtureSetUp], [Test]).
For
more test attributes in Unit test: https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testinitializeattribute.aspx
For
the below exapleim I have use Nunit.