-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
How can I handle errors for the elements p.MustElement #657
Comments
Please add a valid Please fix the format of your markdown: 11 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] generated by check-issue |
Because
How to click button that is not visible on the page? Maybe your selector seclects a wrong button. |
Yes @ysmood , so is there any way I can handle it. How should I check is that element present in the html or not? |
Lines 143 to 146 in 4bbedf8
|
Rod Version: v0.107.3
Looking to handle the error or panic in case the element not found or something else want wrong, while selecting or clicking an element.
For example, in page.MustElement if frame not found
pF := page.MustElement("#selector_name").MustFrame()
or while clicking a button, I see there were errors like
panic: element has no visible shape or outside the viewport: <#selector_name>
pF.MustElement("#selector_name").MustClick()
The text was updated successfully, but these errors were encountered: