0 votes
1 view
in Devops and Agile by (20k 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 (28.4k 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.
Welcome to Intellipaat Community. Get your technical queries answered by top developers !