SeleniumHQ / SeleniumHQ/selenium

[🚀 Feature]: Implement high level BiDi navigation commands

Open
#14,208 3 comments 0 reactions 0 assignees View on GitHub
A-needs decision B-devtools I-enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.