我正在使用Selenium IDE创建一些测试场景,我想创建一个场景,在这个场景中,用户在没有登录的情况下尝试访问某个url。但是网页应该将用户重定向到登录屏幕,因为用户需要先登录,但我找不到任何关于使用Selenium IDE重定向的信息。
发布于 2016-05-26 18:19:42
看看这个。这将阻止javascript重定向:
getEval | window.location.href = 'http://your.page';
storeLocation | url
while | storedVars['url'] != 'http://your.page'
storeLocation | url
endWhile
getEval | window.stop();为此,您需要Selenium IDE流控制。
如果您只需要检查是否发生了重定向:
open | http://your.page
pause | 5000
storeLocation | url
verifyEval | storedVars['url'] == 'http://crocodile.page' | true如果你需要其他东西,试着让你的问题更详细一点。很难理解你想要做什么。
https://stackoverflow.com/questions/37455438
复制相似问题