dimanche 3 mai 2015

WebDriver PageFactory Framework

Can someone explain or give me an example for webdrive pagefactory framework. My requirements are:

  1. I should have one class which will give the driver(based on the explorer). this class would be singleton class so that i can maintain single instance of drive through out my test. This class also have setup and tear down method for the driver, which should run on each test. probably we will have to use TestNg annotation @BeforeTest and @AfterTest
  2. Second class would be pageclass where i will have all page object declared with page initelements method. This class should have page invoke method which will invoke the page.
  3. Test case class where i will have all the test cases written, will use above both the class to test the page functionality.

Please help me to write this three class. Thanks.

Aucun commentaire:

Enregistrer un commentaire