1

I am writing an automated test script. So far, Selenium has helped me. Now,I have a test case where I should tamper the request and add a parameter and then submit the request. I did it manually by using tamperdata.

I want to automate this test case now. The problem is, selenium is not recording my actions of adding a parameter and then submitting the request. I understand selenium is a record-playback kind of tool. can some one confirm me if it cannot record tamper data or am doing wrong?

If it cannot, how do you people automate these kind of test cases.

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
Naga Sandeep
  • 1,341
  • 2
  • 11
  • 24

1 Answers1

0

Selenium really is not designed for such a type of work. If a regular user can't make a tampered request (without Firebug etc.), then Selenium usually can't, too. Anyway, you can have FireBug: How do I run Firebug within Selenium WebDriver (Selenium 2)?. Controlling it, that's where the problems come - and I don't think it's worth the research.

One way to do this could be HttpUrlConnection in Java, making and sending the request in Java ... see those SO questions: How to send HTTP request in java?, Using java.net.URLConnection to fire and handle HTTP requests

Community
  • 1
  • 1
Petr Janeček
  • 35,186
  • 10
  • 116
  • 139