在Selenium中断言重定向的最佳方法是什么?

And*_*rew 8 php selenium phpunit selenium-rc

我正在写一个selenium测试,我需要断言页面被重定向.我该如何验证?什么是最好的方式?

我正在使用PHPUnitPHPUnit_Extensions_SeleniumTestCase.

s_h*_*itt 8

assertLocationEquals - 如果当前位置不等于给定的$ location,则报告错误.

$this->assertLocationEquals($someNewUrl);
Run Code Online (Sandbox Code Playgroud)