- 论坛徽章:
- 0
|
回复 3# mcshell
谢谢你的回复!这个模块没用过,能否写个简单的例子给小弟看一下?
我看了cpan上作者的一个例子是这样的:- use Test::More tests => 5;
- use Test::WWW::Selenium;
- # Parameters are passed through to WWW::Selenium
- my $sel = Test::WWW::Selenium->new( host => "localhost",
- port => 4444,
- browser => "*firefox",
- browser_url => "http://www.google.com",
- default_names => 1,
- error_callback => sub { ... },
- );
- # use special test wrappers around WWW::Selenium commands:
- $sel->open_ok("http://www.google.com.hk", undef, "fetched G's site alright");
- $sel->type_ok( "q", "hello world");
- $sel->click_ok("btnG");
- $sel->wait_for_page_to_load_ok(5000);
- $sel->title_like(qr/Google Search/);
- $sel->error_callback(sub {...});
复制代码 这个代码也看不太明白,能否给指点一二?谢谢!
|
|