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

[🚀 Feature]: Implement high level BiDi navigation commands #14208

Open
titusfortner opened this issue Jun 28, 2024 · 0 comments
Open

[🚀 Feature]: Implement high level BiDi navigation commands #14208

titusfortner opened this issue Jun 28, 2024 · 0 comments
Labels
A-needs decision C-devtools BiDi or Chrome DevTools related issues I-enhancement

Comments

@titusfortner
Copy link
Member

titusfortner commented Jun 28, 2024

Feature and motivation

This comes from this discussion

We want to be able to allow users to set listeners on navigation commands to get context information that can be used in logging.

I think we would only need to support this for now? Would it make sense to put it in navigate class with the other commands?
7.3.4.4The browsingContext.fragmentNavigated Event

Usage example

driver.navigate.add_navigated_handler { |event|
  @watch_context = event.context if event.url.include?(whatever) 
}
driver.script.add_console_message_handler { |event|
  log_messages << event.text if event.source["context"] == @watch_context
}
driver.get(my_url)
@titusfortner titusfortner added A-needs decision I-enhancement C-devtools BiDi or Chrome DevTools related issues labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-needs decision C-devtools BiDi or Chrome DevTools related issues I-enhancement
Projects
None yet
Development

No branches or pull requests

1 participant