Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element存在,但Element.MustHas却为false,检测不到Element #1058

Closed
ghost opened this issue May 9, 2024 · 2 comments
Closed

Element存在,但Element.MustHas却为false,检测不到Element #1058

ghost opened this issue May 9, 2024 · 2 comments
Labels
question Questions related to rod

Comments

@ghost
Copy link

ghost commented May 9, 2024

Rod Version:0.116.0
页面URL:https://pub.alimama.com
//先进入iframe loginIframe := tb.page.MustElement("iframe").MustFrame() //切换到扫码登录方式 if loginIframe.MustHas("#login>.view-type-qrcode") { loginIframe.MustElement("#login>.view-type-qrcode>.icon-qrcode").MustEval(()=>{let e = document.createEvent("MouseEvents");e.initEvent("click", true, true);this.dispatchEvent(e);}) }
问题1:loginIframe.MustHas始终返回false,但是loginIframe.MustElement("#login>.view-type-qrcode>.icon-qrcode")却可以正确取得Element。
问题2:loginIframe.MustElement("#login>.view-type-qrcode>.icon-qrcode").MustEval(()=>{let e = document.createEvent("MouseEvents");e.initEvent("click", true, true);this.dispatchEvent(e);})如果换成loginIframe.MustElement("#login>.view-type-qrcode>.icon-qrcode").MustClick(),偶尔会出现点击无效(有发送点击事件,但实际按钮事件未被触发)

@ghost ghost added the question Questions related to rod label May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.116.0

Please fix the format of your markdown:

3:1 MD038/no-space-in-code Spaces inside code span elements [Context: "`"]
10:1 MD038/no-space-in-code Spaces inside code span elements [Context: "`"]

generated by check-issue

@ysmood
Copy link
Collaborator

ysmood commented May 10, 2024

#322

@ysmood ysmood closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

1 participant