Which is best way to keep objects for below scenario , Properties or By OBject?

I am building selenium framework (C#) for my project, I am in the initial phase. So I am exploring to keep most of the best practices across. While using P

150
Select a Category
Appium
Mobile Testing – Manual
Program QA / Test Management
Program QA Automation
Selenium WebDriver
Software Testing

Selenium WebDriver

  • Select a Category
  • Appium
  • Mobile Testing – Manual
  • Program QA / Test Management
  • Program QA Automation
  • Selenium WebDriver
  • Software Testing

ageFactory which you have used in the above code test method i have a scenario where if submit button does not exist in the page I need to do some operation for ex: click on new button or some thing. With the code submit IWebElment object does not exist it will throw exception. How do you want me to handle this type of scenario. Please let me know may be am I thinking in wrong way or not, instead of using properties if I use something like By object (public static By saveBtn = By.Id(“save”) so that I can check if Save By objects exists or not before clicking. I am confused whether do I need to use these [FindsBy(How = How.Id, Using = “”)] properties or static By Objects in my page class file. Please help me on this.

Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.