Created
July 30, 2013 20:42
-
-
Save bbhenry/6116725 to your computer and use it in GitHub Desktop.
Perl_Selenium_example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Selenium::Remote::Driver; | |
use Test::More tests=>4; | |
my $driver = Selenium::Remote::Driver->new; | |
$driver->get("http://www.google.com"); | |
$driver->find_element('q','name')->send_keys("Hello WebDriver!"); | |
ok($driver->get_title =~ /Google/,"title matches google"); | |
is($driver->get_title,'Google',"Title is google"); | |
ok($driver->get_title eq 'Google','Title equals google'); | |
like($driver->get_title,qr/Google/,"Title matches google"); | |
$driver->quit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment