'how to automate web testing using Python script?
My requirement is very simple:
- I have to login to my company's website
- Go to a specific page that contains reports/Insights represented as charts(PBI reports)
- select values from the dropdown in the filters available, click apply
- Capture the values/units represented in the chart
- Compare the captured values against the database
- Return the results
I know how to connect to database, run queries and store the output but i am fairly new to the web test automation part. I also know that we could use RPA framework to automate Web testing but the team doesn't want to have a separate framework from the existing ones.
The chart are PBI visuals embedded in the web page. I cannot share a screenshot of the web page as we are not supposed to share them in a public forum.
can someone help me understand how i can achieve the above mentioned steps using the Python script? can it be done with request and beautifulsoup modules or is there a better to do it? Any ideas are always welcome.
Solution 1:[1]
UI Web testing is done by running automated browsers though special drivers.
There are several wrapper-libs around that drivers, most popular ones is: Selenium, Playwright and Puppeteer
I recomend using playwright as it's the most modern and convinient one.
You could start from "Getting Started" section of docs
Solution 2:[2]
I would recommend to start with beautifulsoap and selenium. It's pretty easy. Just go into their docs and you'll understand after few minutes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alex Kosh |
| Solution 2 | Discide |
