0
我使用硒2的webdriver通過Facebook使用PHP Selenium Webdriver斷言URL?
我想檢查當前URL等於硬編碼網址寫,但我的代碼does not工作:
$驅動程序 - >等待(3) - >直到(
WebDriverExpectedCondition::presenceOfAllElementsLocatedBy( $url = $driver->getCurrentURL(); if($url == 'http://myurl.com') { echo 'yes correct url'; } )
);
getCurrentUrl()實際返回什麼?我懷疑,它返回'http://myurl.com/',而不是'http://myurl.com' –