gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-11-01 12:35:15 26 4
gpt4 key购买 nike

我正在编写一个 selenium 测试,我需要断言该页面已重定向。我应该如何验证这一点?什么是最好的方法?

我正在使用 PHPUnitPHPUnit_Extensions_SeleniumTestCase

最佳答案

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

$this->assertLocationEquals($someNewUrl);

关于php - 在 Selenium 中断言重定向的最佳方式是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2769242/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com