TestRunner, loops and conditions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

TestRunner, loops and conditions

Paatsch, Bernd
TestRunner, loops and conditions

Hello selenium users,

So far selenium rocks and works great. Diving deeper into it I wonder if there are loops and conditions that could be put into the html code for the TestRunner to execute? If not does the driver support loops and conditional branching (I haven't looked into the driver yet)?

Thanks,
Bernd

Reply | Threaded
Open this post in threaded view
|

Re: TestRunner, loops and conditions

Dan Fabulich
Paatsch, Bernd wrote:

> So far selenium rocks and works great. Diving deeper into it I wonder if
> there are loops and conditions that could be put into the html code for the
> TestRunner to execute? If not does the driver support loops and conditional
> branching (I haven't looked into the driver yet)?

Yes, Driven Mode supports loops and conditionals.  (I prefer to call it
"Driven Mode" instead of "the driver" because there's not just one driver:
there's a Java Driver, a .NET Driver, a Ruby Driver, and a Python driver.)

The default TestRunner doesn't support loops or conditionals.  It's not
hard to add a simple "ifgoto" command; it makes the HTML table language
look a lot like assembly.  Supporting the full power of JavaScript in the
client-side code is unfortunately very challenging...  You may have seen a
long post from me today on "Ifs and Loops".

http://forums.openqa.org/message.jspa?messageID=2747#2747

-Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: TestRunner, loops and conditions

Luke Closs
On Fri, Jan 06, 2006 at 09:46:07PM -0800, Dan Fabulich wrote:

> Paatsch, Bernd wrote:
>
> >So far selenium rocks and works great. Diving deeper into it I wonder if
> >there are loops and conditions that could be put into the html code for the
> >TestRunner to execute? If not does the driver support loops and conditional
> >branching (I haven't looked into the driver yet)?
>
> Yes, Driven Mode supports loops and conditionals.  (I prefer to call it
> "Driven Mode" instead of "the driver" because there's not just one driver:
> there's a Java Driver, a .NET Driver, a Ruby Driver, and a Python driver.)

Don't forget the Perl driver by Mattia Barbon:

  http://search.cpan.org/~mbarbon/Test-WWW-Selenium-0.02/

Luke

--
Luke Closs
PureMessage Developer
There is always time to juggle in the Sophos Zone.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: TestRunner, loops and conditions

GW-5
In reply to this post by Paatsch, Bernd
Hi All

So far Selenium looks good.... there are 2 issues I see with Selenium...

1. I'm having to hard-code the data into my test scripts, as Selenium accepts data from <td> </td> tags. So what this means is that I'm not able to parameterize my test data for this script. Plz suggest a workaround, I've tried to declare a array and calling objects from there, but that brings me the second issue

2. Iterative testing where'in i'm trying to run my scripts iteratively, like any other func. testing tool, however havent been able to do so till now. I'm looking for some method/function which will transfer the control to the start of the script.

-Kapil
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=988&messageID=2758#2758

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]