Home > Software engineering >  Is there any way post in selenium?
Is there any way post in selenium?

Time:03-08

I want to handle POST method in selenium. ( To login fast as requests ) I've succeed login in requests.post

in requests:

session = requests.session()
session.post(url, data=data, headers=headers)

However, it seems that selenium doesn't have any method like POST in requests. So, I want to save the session, and applyy in selenium.

Just like this:

post and login in session -> selenium.get() Which url that only users can get in

How can I?

CodePudding user response:

Selenium is built to simulate user GUI actions like clicking on elements, reading their texts, scrolling the page etc.
Performing API POST, GET etc. requests are not supported by Selenium.
There are several dedicated tools for such actions like Postman and SW libraries allowing you to perform such actions programmatically.

CodePudding user response:

Sharing this similar question here https://stackoverflow.com/a/34964580/6929589. The answer there suggests to use https://pypi.python.org/pypi/selenium-requests/ . You may visit the actual question link.

  • Related