I have a Java application that scans a website using selenium. It is crawling all the pages of the website. Some of these pages choose a combination of dynamically combinations and click on some buttons. The objective of this application is to crawl through all the pages of the website and save the HTML source and screenshots of all pages. The contents and composition of these webpages varies over time.
The application is working fine, but the way to call webdrover and enter a set combination of elements and click the button to get everyone, pages often need to be updated because the website The HTML structure of that varies frequently.
Now my question is: how can I test the functionality of my Java methods that call the web driver from the unit test I access unit tests to test the stability of my code Finding the HTML element, filling the price, clicking on the button, getting the HTML source I currently save a sample HTML file and check its code against it. But since I have to update my codes and unit tests with every HTML structure change, which defeats the purpose of the unit test, even if I have to update my unit test (the values on the page also change) .
Please help find an efficient or correct approach to test your code using unit tests.
I am working on the same feature in this project so that I am reviewing several changes in UI appraisal Enabled version
To answer your question, I used the Fantomos S to solve a test problem with a cool website. As you prepare yourself a joke website, you know what to expect.
I hope this help!
Comments
Post a Comment