Is there any way to start with a POST request using Selenium?

0
0

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 a POST method.

  • You must to post comments
0
0

Short answer: No.

But you might be able to do it with a bit of filthing. If you open up a test page (with GET) then evaluate some JavaScript on that page you should be able to replicate a POST request. See JavaScript post request like a form submit to see how you can replicate a POST request in JavaScript.

Hope this helps.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website