【发布时间】:2016-11-08 11:59:26
【问题描述】:
我使用 Codeception 进行了验收测试。 PhantomJS 被配置为我的 Webdriver。在我的页面上,我有一个包含 target="_blank" 的链接。问题是,当我指示 Codeception 点击它时,它并没有关注新打开的选项卡。因此我的测试失败了。
代码:
$I->click('My Link that opens new tab');
我尝试过的:
$I->switchToWindow('Title of my new window'); // doesn't work
$I->see('Some text in my new tab'); // also doesn't work
我的acceptance.suite.yml:
class_name: AcceptanceTester
modules:
enabled:
- WebDriver
- \Helper\Acceptance
config:
WebDriver:
url: 'http://localhost'
browser: 'phantomjs'
port: 5555
window_size: '1024x768'
有人有想法吗?
【问题讨论】:
标签: php phantomjs codeception