Skip to content

Update missing steps in Webdriver - ElementClick - #36660

Closed
longvatrong111 wants to merge 1 commit into
servo:mainfrom
longvatrong111:element-click
Closed

longvatrong111 wants to merge 1 commit into
servo:mainfrom
longvatrong111:element-click

Conversation

@longvatrong111

@longvatrong111 longvatrong111 commented Apr 23, 2025 •

Copy link
Copy Markdown
Contributor

Fix panic in WebDriver handle element click.

  • Handle receiver.recv() instead of calling unwrap() directly.
  • A bit refactor.

Testing: tests/wpt/tests/webdriver/tests/classic/element_click/click.py
Fixes: #36658

cc: @xiaochengh

Comment thread components/script/webdriver_handlers.rs Resolved
Comment thread components/webdriver_server/lib.rs Resolved
Comment thread components/webdriver_server/lib.rs Resolved
Comment thread components/script/webdriver_handlers.rs Resolved

@xiaochengh xiaochengh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

Could you make the PR title more specific? For example: Fix panic in WebDriver handle element click

Comment on lines +1254 to +1256
if !node.is::<Element>() {
return Err(ErrorStatus::NoSuchElement);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this change related to the error handling in lib.rs? If it's an independent change, better split it into a separate PR.

Btw I think it's better to have a find_element_by_unique_id that rejects non-element nodes on top of find_node_by_unique_id if other methods also need to reject non-element nodes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

@longvatrong111

Copy link
Copy Markdown
Contributor Author

Looks good overall.

Could you make the PR title more specific? For example: Fix panic in WebDriver handle element click

The panic issue is fixed in this PR for all command:

#35024

I will change this PR to implement some missing steps in ElementClick.

@longvatrong111 longvatrong111 changed the title Update Webdriver handle element click Update missing steps in Webdriver - ElementClick May 6, 2025
@longvatrong111

Copy link
Copy Markdown
Contributor Author

Wait for #36744 then implement scroll into view.

@longvatrong111
longvatrong111 deleted the element-click branch May 15, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Many steps are missing in WebDriver handle element click implementation

4 participants