Skip to main content
Tweeted twitter.com/StackSQA/status/946990162407579648
edited body
Source Link

I'm starting my career as a QA Automation Engineer coming from a Jr dev background. I noticed that there are two main design patterns for Selenium, POM and PageFactory. Which is the preferred design pattern to use in best practice? Also, there are several ways of finding an HTML element. Which one tends to be the best practice rule of finding an element? Is it ID?

  • Which is the preferred design pattern to use in best practice?
  • Also, there are several ways of finding an HTML element. Which one tends to be the best practice rule of finding an element? Is it ID?

As for Page Factory, my understanding is that for each webpage, you create a class representation of said webpage, and within the class, you create methods that act upon the webelements. You then will have different test classes that do the actual testing. Please correct or confirm my understanding.

Thanks!

I'm starting my career as a QA Automation Engineer coming from a Jr dev background. I noticed that there are two main design patterns for Selenium, POM and PageFactory. Which is the preferred design pattern to use in best practice? Also, there are several ways of finding an HTML element. Which one tends to be the best practice rule of finding an element? Is it ID?

As for Page Factory, my understanding is that for each webpage, you create a class representation of said webpage, and within the class, you create methods that act upon the webelements. You then will have different test classes that do the actual testing. Please correct or confirm my understanding.

Thanks!

I'm starting my career as a QA Automation Engineer coming from a Jr dev background. I noticed that there are two main design patterns for Selenium, POM and PageFactory.

  • Which is the preferred design pattern to use in best practice?
  • Also, there are several ways of finding an HTML element. Which one tends to be the best practice rule of finding an element? Is it ID?

As for Page Factory, my understanding is that for each webpage, you create a class representation of said webpage, and within the class, you create methods that act upon the webelements. You then will have different test classes that do the actual testing. Please correct or confirm my understanding.

Source Link
chris
  • 81
  • 1
  • 3

POM vs PageFactory

I'm starting my career as a QA Automation Engineer coming from a Jr dev background. I noticed that there are two main design patterns for Selenium, POM and PageFactory. Which is the preferred design pattern to use in best practice? Also, there are several ways of finding an HTML element. Which one tends to be the best practice rule of finding an element? Is it ID?

As for Page Factory, my understanding is that for each webpage, you create a class representation of said webpage, and within the class, you create methods that act upon the webelements. You then will have different test classes that do the actual testing. Please correct or confirm my understanding.

Thanks!