ACT and ASP.NET -- Fire a button on a webpage?

G

Guest

Got a test script where I want Application Center Test to log off a user I
just logged in via forms authentication. On one of my forms I have a button
called btnLogout that, when pressed, logs off the user. I recorded myself
logging on and logging off, and from the generated script I see:

oRequest.Body = "__VIEWSTATE=dDw5NjU1MTU1Ozs%2B9uu4k2OBFxBARxlvF8%2"
oRequest.Body = oRequest.Body + "F6u0Jmt8I%3D&btnLogout=Logout"


I assume that this is the correct Sub and the relevant code from the
Sub--that point at which the button is pressed and a response is sent back to
the server. Playing this back doesn't work. The following variations also
do not work:

oRequest.Body = "__VIEWSTATE=&btnLogout=Logout"
oRequest.Body = "__VIEWSTATE=btnLogout=Logout"
oRequest.Body = "&btnLogout=Logout"
oRequest.Body = "btnLogout=Logout"

What should the request body look like? I attempted to do it by sending a
GET to the page with the logoff button with "?__EVENTTARGET=btnLogout"
appended to the end, but that also didn't work.

Any hints on how to get that button to fire? TIA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top