/ Published in: Perl
In order for this to work, the Selenium-RC server must be running.
See also the tutorial at http://search.cpan.org/~mschwern/Test-Simple-0.71/lib/Test/Tutorial.pod
Expand |
Embed | Plain Text
use WWW::Selenium; use Test::More tests => 2; #update to reflect the number of tests to be run my $sel = WWW::Selenium->new( host => "localhost", port => 4444, browser => "*iexplore", # *iehta has more cross-domain privileges than *iexplore browser_url => "http://mysite.com", ); $sel->start(); $sel->open("http://mysite.com/testpopup.html"); diag("Check whether the popup is hidden."); my $canSeePopup = $sel->is_visible("modalWindow"); ok ($canSeePopup == 0, "Popup is not visible."); diag("Check whether the magic is hidden."); ok( $sel->is_visible("modalWindowMagicLayer") == 0, "CSS magic is hidden... for now." ); $sel->stop();;
You need to login to post a comment.
