tags:

views:

560

answers:

3

Good morning

I have been running a few tests over the past couple of weeks and I have come up against a bit of a wall.

I am testing in IE 7 and 8 and firefox.

Basically my problem is that IE 8 does not yet support a plug in and firefox does not support a referer in a frameset, so basically I want to do is detect which browser I am using and then if its ie 7 run the tests, else skip certain tests, is this possible?

Thanking everyone in advance for their help.

Cheers

Cameron

A: 

Hmmm one solution that came up in my mind... maybe it's a little bit odd, but I think it should work: let your Web app. read the HTTP UserAgent and save it as a hidden HTML input field. Then you can access it from your Selenium tests and decide whether you want to continue running them or not.

Maybe there's a better solution, I don't know.

Igor Brejc
A: 

I might be missing something (probably!) but if all you're trying to do is target tests to IE then would conditional comments work?

<!--[if ie 7]>

    The tests go here.

<![endif]-->
David Thomas
+1  A: 

Just a note for anyone else who reads this: the question is around using Selenium Core and the solution is designed to edit the HTML-based test suite file. If you're using Selenium RC, you obviously know which browser you launched :)

Patrick Lightbody