History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-92
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Luke Closs
Reporter: Shane Landrum
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Perl bindings don't support assert/verify/waitForFoo commands

Created: 22/Jun/06 09:36 AM   Updated: 05/Nov/08 03:08 PM
Component/s: Client Driver - Perl
Affects Version/s: 0.8.1
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: OS X 10.3.9


 Description  « Hide
WWW::Selenium has no support for the assert/verify/WaitFor command sets listed in the docs at http://release.openqa.org/selenium-core/nightly/reference.html . I'm doing some automated testing using Test::WWW::Selenium, and the lack of support for these commands is a Major Problem.

 All   Comments   Work Log   Change History      Sort Order:
Shane Landrum - 22/Jun/06 09:41 AM
Although, now that I think about it, this might also be a documentation bug.
From http://openqa.org/selenium-rc/perl.html :

"Test::WWW::Selenium does not require explicit start/stop commands (since these will be handled during test cleanup), and allows you to quickly make any Selenium method a test simply by adding the suffix "_ok" to any Selenium method. Hence, instead of using $sel->click you can use $sel->click_ok to make it a test. In addition, for each Selenium getter (get_title, ...) there are six autogenerated methods (<getter>_is, <getter>_isnt, <getter>_like, <getter>_unlike, <getter>_contains, <getter>_lacks) to check the value of the attribute)."

If you're binding the assert/verify/waitfor commands differently than this, it should be communicated clearly.

Dan Fabulich - 15/Oct/06 11:44 PM
The reference.html docs are only true of HTML Selenese; the Perl driver has its own Perldocs (which don't claim that you can do "waitFor" commands, etc).

Most Selenese features are there because the Selenese language is so simplistic; e.g. the "store" commands exist because Selenese doesn't have normal variables, so Perl doesn't need them.

Specifically, in Test::More, there's no difference between assert/verify commands. Just use Test::WWW::Selenium to run "*_ok" commands; the test will continue running.

As for the waitFor commands, you can implement those yourself just by sleeping and checking getters. Still, you're right, this would be a handy feature to add to T::W::S.

Andras Hatvani - 05/Nov/08 12:48 PM
Changing issue type

Luke Closs - 05/Nov/08 03:08 PM
You can use the $sel->wait_for_page_to_load_ok() method if you want. It could be nice to have these in the core library as a nice to have.

If you'd like to provide a patch, my latest code is here:

  http://github.com/lukec/selenium-rc-perl/tree/master

Cheers,
Luke