Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
611 views
by Contributing Tester (53 points)
retagged by
Hi, I didn't know how to name question in one sentence but here's my problem:

I need to get information from web-site. First of all I have to sign in using username and password then insert start date and end date and press button "generate report" it shows information I need. But when I call method driver.page_source it returns html code without that report, so page doesn't contain it. How can I get it.

Also I tried selenium-request to make post ( driver.request("post", url, data={"a": "b"}) ) request but it doesn't return correct information. Does it use current cookies when I call it?

Or how can I get response in selenium when I press "generate report" button?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
make sure that your report is not displaying under iframe. If it is displaying under iframe, you will have to switch to iframe and get the source. Also, sometimes inside the iframe, web app will show PDF file. In that case you will have to download the PDF file and use PDF libraries to verify the PDF file.

Hope that answers your question.
by The go-to Tester (181 points)
Also, sometimes your code might be loaded via JQuery / Ajax calls. In that case, you will have to wait for particular element, which will say that your code is loaded. And then get the source of your page.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...