Skip to content

Instantly share code, notes, and snippets.

@bbhenry
Created July 30, 2013 20:42
Show Gist options
  • Save bbhenry/6116725 to your computer and use it in GitHub Desktop.
Save bbhenry/6116725 to your computer and use it in GitHub Desktop.
Perl_Selenium_example
#!/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