U
U
Us592020-05-28 14:57:14
Parsing
Us59, 2020-05-28 14:57:14

Is it possible to get data that is loaded via ajax in Selenium?

On the site, when you click the "Continue" button, data is loaded via ajax, through the inspector I see a request and there is a large json, but this json is not shown to the user, the user sees only the error text.

Question: If I use Selenium, can I get the data that is loaded via ajax, so that in the end I get the full json that can be found in the browser inspector?

Or maybe someone will suggest an alternative to Selenium, but I will immediately clarify that the site uses JS.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey_Dolg, 2020-05-28
@Andrey_Dolg

You can here a whole fan of ways. If you take only those that are available from regular selenium, then they all go through javascript and mean that you:
1) either repeat this ajax request
2) either connect to the function that sends it and listen to it
3) or find in which variable if it There is also data stored in the body of the page.
But if you refuse selenium, then it will usually be better. =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question