Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.4k points)

I'm trying to start a Selenium test with a POST request to my application.

Instead of a simple open(/startpoint)

I would like to do something like open(/startpoint, stuff=foo,stuff2=bar)

Is there any way to do that?

I'm asking this because the original page which posts to this start point depends on external providers that are often offline (development environment) and so will often fail too early (and are not the subject of the test)

I guess sending data as GET would work too. I would just prefer using the POST method.

1 Answer

0 votes
by (27.5k points)
Only way to start a Selenium test with a POST request to your application is to open up the test page using GET first and then evaluate the JavaScript uses on that test page. From this assuming you have idea about JavaScript, you should be able to replicate a POST request.

Browse Categories

...