-
-
Couldn't load subscription status.
- Fork 1.5k
[dotnet] Add examples for BiDi W3C Browsing Context #1940
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
base: trunk
Are you sure you want to change the base?
[dotnet] Add examples for BiDi W3C Browsing Context #1940
Conversation
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
|
|
||
| var element = (await context.LocateNodesAsync(Locator.Css("#checky")))[0]; | ||
|
|
||
| //TODO: ShareId is a type, not string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can implicitly convert RemoteNodeValue (if I remember correctly) to SharedId.
await context.CaptureScreenshotAsync(new() { Clip = new ElementClipRectangle(element) });And moving forfard:
await context.CaptureScreenshotAsync(new() { Clip = ClipRectangle.Element(element) });| { | ||
| var context1 = await driver.AsBidirectionalContextAsync(); | ||
|
|
||
| var context2 = await context1.BiDi.CreateContextAsync(ContextType.Tab, new() { ReferenceContext = context1 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great if context1 can expose CreateContextAsync method, which implicitly sets ReferenceContext to the context1
|
Still waiting when we break nested types here SeleniumHQ/selenium#15407 |
|
@nvborisenko, what needs to be done in this PR to have it ready? |

User description
Examples for https://www.selenium.dev/documentation/webdriver/bidi/w3c/browsing_context/
TODO:
Types of changes
Checklist
PR Type
Tests, Enhancement
Description
BaseTestclass to include WebSocket URL option in ChromeOptions.Changes walkthrough 📝
1 files
BaseTest.cs
Add WebSocket URL option to ChromeOptionsexamples/dotnet/SeleniumDocs/BaseTest.cs
UseWebSocketUrloption to ChromeOptions.11 files
BrowsingContextTest.BrowsingContextCreatedEvent.cs
Add test for BrowsingContextCreatedEventexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.BrowsingContextCreatedEvent.cs
BrowsingContextTest.BrowsingContextDestroyedEvent.cs
Add test for BrowsingContextDestroyedEventexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.BrowsingContextDestroyedEvent.cs
BrowsingContextTest.BrowsingContextLoadedEvent.cs
Add test for BrowsingContextLoadedEventexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.BrowsingContextLoadedEvent.cs
BrowsingContextTest.CreateBrowsingContext.cs
Add tests for creating browsing contextsexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CreateBrowsingContext.cs
BrowsingContextTest.DomContentLoadedEvent.cs
Add test for DomContentLoadedEventexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.DomContentLoadedEvent.cs
BrowsingContextTest.FragmentNavigatedEvent.cs
Add test for FragmentNavigatedEventexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.FragmentNavigatedEvent.cs
BrowsingContextTest.GetBrowsingContextTree.cs
Add test for retrieving browsing context treeexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetBrowsingContextTree.cs
BrowsingContextTest.NavigateToUrl.cs
Add tests for URL navigationexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.NavigateToUrl.cs
BrowsingContextTest.NavigationStartedEvent.cs
Add test for NavigationStartedEventexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.NavigationStartedEvent.cs
BrowsingContextTest.UserPromptEvent.cs
Add tests for user prompt eventsexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.UserPromptEvent.cs
BrowsingContextTest.cs
Create BrowsingContextTest partial classexamples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.cs
1 files
NuGet.config
Add GitHub Packages to NuGet sourcesexamples/dotnet/SeleniumDocs/NuGet.config
1 files
SeleniumDocs.csproj
Update Selenium.WebDriver package versionexamples/dotnet/SeleniumDocs/SeleniumDocs.csproj