Page 2 of 2

Re: Web Transaction - Webinject issue

Posted: Tue Aug 26, 2014 11:47 am
by Phil.Pearce
Hi,

Whats the difference between the two examples? cant see it?


below is what I could get out of the RAW header

Code: Select all

POST https://my.domain.com/submit-login HTTP/1.1
Host: my.domain.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://my.domain.com/login
Content-Length: 89
Cookie: fsid=MWVkMGM5ODMtMjQzNC00YjRmLTk3MjEtODE1YzRlMzRjYWU4; IsUserOptedInCookie=true
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

{"username":"[email protected]","password":"123456","stayLoggedIn":false}

Re: Web Transaction - Webinject issue

Posted: Tue Aug 26, 2014 5:08 pm
by tmcdonald
The first example encapsulates all of the parameters into the <case> tag itself, while the second has the <case> and the closing </case> with the parameters between them.

Re: Web Transaction - Webinject issue

Posted: Wed Aug 27, 2014 3:06 am
by Phil.Pearce
Both gave same result

(Return code of 255 is out of bounds)

Re: Web Transaction - Webinject issue

Posted: Thu Aug 28, 2014 5:04 pm
by tmcdonald
If your web app truly does log in using JSON, I think we're at a loss. Webinject doesn't seem to support "application/json" content type posting:

http://lists.op5.com/pipermail/op5-user ... 12710.html

If you can talk to the developers they might be able to come up with another login method. A straight GET or POST to a URL is the best way to handle this.

Re: Web Transaction - Webinject issue

Posted: Fri Aug 29, 2014 2:53 am
by Phil.Pearce
Yeah, last couple of days I've been trying to integrate selinium.

Re: Web Transaction - Webinject issue

Posted: Fri Aug 29, 2014 1:30 pm
by sreinhardt
Selenium is pretty fantastic. Like webinject it takes a bit to get used to it, but once done it's hard to beat. Let us know if you have questions!