nightwatchjs/nightwatch

`frame()` command doesn't support page object element

開放

#3,655 建立於 2023年3月25日

 (7 則留言) (0 個反應) (1 位負責人)JavaScript (1,289 個分叉)batch import
buggood first issuehacktoberfest

倉庫指標

星標
 (11,707 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Description of the bug/issue

When I use frame() command, I expect the page object element can be used as a selector, but actually, it won't work.

Steps to reproduce

Try using frame() with a page object element.

Sample test

myPage.api.frame('@myIframe')

Nightwatch.js Version

2.6.14

Additional Information

See Discord discussion https://discord.com/channels/618399631038218240/1088668054650626058

David Burns - AutomatedTester — Yesterday at 21:33 I think this might need a bug raised. That doesn't seem right andrei — Today at 01:42 when using page objects, elements passed to commands on the .api namespace aren't resolved automatically. but we can easily add the frame() command on the main page object namespace Currently .frame() is implemented as a "protocol" command, so we will need to move it to the element-commands and update the implementation as needed. It's a relatively straightforward task.

貢獻者指南