如何使用SeleniumPerlAPI获取当前url
我只是想获取页面的当前绝对url。下面是代码片段如何使用SeleniumPerlAPI获取当前url,perl,url,selenium,Perl,Url,Selenium,我只是想获取页面的当前绝对url。下面是代码片段 my $url_str = "BEFORE"; $sel->storeLocation("url_str"); $sel->comment(URL is $url); Send command: storeLocation|url_str| Got result : OK Comment : URL is BEFORE 它似乎不起作用。我尝试使用$url\u str、\$url\u str作为storeLocation的
my $url_str = "BEFORE";
$sel->storeLocation("url_str");
$sel->comment(URL is $url);
Send command: storeLocation|url_str|
Got result : OK
Comment : URL is BEFORE
它似乎不起作用。我尝试使用$url\u str、\$url\u str作为storeLocation的参数,但没有成功。请帮助我了解我在这里到底遗漏了什么Perl API使用了更高级的“get_uuu”作为前缀,而不是Selenium标准的“store”。Perl API也使用下划线而不是大小写
# returns the current url
$sel->get_location()
另见:
CPAN上的文档
CPAN上的文档
Perl API使用更为简练的“get_”作为前缀,而不是Selenium标准的“store”。Perl API也使用下划线而不是大小写
# returns the current url
$sel->get_location()
另见:
CPAN上的文档
CPAN上的文档
很抱歉打扰你们$sel->get_location是一个API,可以将其作为答案发布并接受,也可以删除该问题;很抱歉打扰你们$sel->get_location是一个API,可以将其作为答案发布并接受,也可以删除该问题;