An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
You're not Making Test Automation Mistakes
This topic comes up after reading
https://blog.testproject.io/2020/10/06/common-mistakes-in-test-automation/
I attempted to respond as a comment but it did not make it through review.
Namely I take issue with "Writing WebDriver API Methods in Tests/Page Objects" as being an issue.
The premise of the issue "Having WebDriver methods in tests is a really bad idea since if there are any changes in Selenium WebDrivers API or different versions of the library"
Wrapping your third party libraries can bring the expressed benefits, but I would claim that only happens when you can create an abstraction for your particular use. Let me put it another way.
The library writer is providing an API to control the inner workings. This API is going to expose all sorts of functionality. When writing a wrapping class two things are likely to happen, you expose all of the same functionality (possibly with the same function signatures) or you cut functionality and provide a simpler interface. You will not know how the public API for selenium will be broken so even your trimmed API could need to be modified to accommodate those changes.
An abstraction on the other hand relies not on the browser interaction but the application and that is what you page objects are providing.
Original Link: https://dev.to/jessekphillips/youre-not-making-test-automation-mistakes-59gb
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To