- 论坛徽章:
- 3
|
本帖最后由 grshrd49 于 2013-07-17 18:05 编辑
用文档中的例子发现不会用啊 是不是要设置浏览器代理吗?
帮忙看下吧 因该则么用指点一下吧! @mcshell
Error requesting http://localhost:4444/selenium-server/driver/:
500 Can't connect to localhost:4444 (timeout)
# Looks like your test exited with 255 before it could output anything.
原来要装个rc
才理解Test::WWW::Selenium - Test applications using Selenium Remote Control
这句话的意思
http://docs.seleniumhq.org/projects/remote-control/
我继续研究一下- 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 => 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe',
- browser_url => "http://www.baidu.com",
- default_names => 1,
- error_callback => sub { ... },
- );
- # use special test wrappers around WWW::Selenium commands:
- $sel->open_ok("http://www.baidu.com", 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 {...});
复制代码 |
|