Home > Software design >  how to automate web testing using Python script?
how to automate web testing using Python script?

Time:04-17

My requirement is very simple:

  1. I have to login to my company's website
  2. Go to a specific page that contains reports/Insights represented as charts(PBI reports)
  3. select values from the dropdown in the filters available, click apply
  4. Capture the values/units represented in the chart
  5. Compare the captured values against the database
  6. 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.

CodePudding user response:

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

CodePudding user response:

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.

  • Related