A
A
AYKostarev2021-02-25 01:12:41
Python
AYKostarev, 2021-02-25 01:12:41

How to send Form Data (which cannot be filled on the page) through Python Selenium Webdriver?

The task is to quickly place an order on the site.
I am using Selenium + Requests. The problem is that the site has a captcha and when you click the "Checkout" button, the 'g-recaptcha-response' parameter is sent in the Post-request data (Form Data).
Using only Selenium, the captcha is solved for a very long time, and, accordingly, the main task is not performed.
Using only Requests, in principle, the issue is solved quite simply - I solve the captcha in advance, get the same g-recaptcha-response and attach it to the Post request (via requests.post('url', data=data)), but on the site after clicking on the 'Place an order' button, a 3DSecure payment confirmation window appears, and using only Requests, this window cannot be opened.

I've been googling for a few days now, I've tried a lot of things, but I still haven't found a suitable solution.
Can you please suggest how to solve this problem? How to send a pre-generated 'g-recaptcha-response' by clicking on a button via Webdriver or How can I open the 3DSecure payment confirmation page after making a Post request via Requests?

Thank you very much in advance! I will be very glad to help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanya Hihi Haha, 2021-02-25
@ValarMayar

Perhaps this library
As far as I understand, popup 3d secure is implemented on js (or its ugly frameworks - jquery, react etc)
The description of the repo seems to say that full support for js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question