SeleniumHQ / SeleniumHQ/selenium
[🚀 Feature]: Implement high level BiDi navigation commands
- Dominant language
- Java
- Stars
- 34.5k
- Forks
- 8.7k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 92
Description
### Feature and motivation
This comes from [this discussion](https://github.com/SeleniumHQ/selenium/issues/13992#issuecomment-2193786922)
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)
Contributor guide
Assessment
This issue has not been assessed yet.