-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[dotnet] Add examples for BiDi W3C Browsing Context #1940
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
User description
Examples for https://www.selenium.dev/documentation/webdriver/bidi/w3c/browsing_context/
TODO:
Types of changes
Checklist
PR Type
Tests, Enhancement
Description
BaseTest
class to include WebSocket URL option in ChromeOptions.Changes walkthrough 📝
1 files
BaseTest.cs
Add WebSocket URL option to ChromeOptions
examples/dotnet/SeleniumDocs/BaseTest.cs
UseWebSocketUrl
option to ChromeOptions.11 files
BrowsingContextTest.BrowsingContextCreatedEvent.cs
Add test for BrowsingContextCreatedEvent
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.BrowsingContextCreatedEvent.cs
BrowsingContextTest.BrowsingContextDestroyedEvent.cs
Add test for BrowsingContextDestroyedEvent
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.BrowsingContextDestroyedEvent.cs
BrowsingContextTest.BrowsingContextLoadedEvent.cs
Add test for BrowsingContextLoadedEvent
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.BrowsingContextLoadedEvent.cs
BrowsingContextTest.CreateBrowsingContext.cs
Add tests for creating browsing contexts
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.CreateBrowsingContext.cs
BrowsingContextTest.DomContentLoadedEvent.cs
Add test for DomContentLoadedEvent
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.DomContentLoadedEvent.cs
BrowsingContextTest.FragmentNavigatedEvent.cs
Add test for FragmentNavigatedEvent
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.FragmentNavigatedEvent.cs
BrowsingContextTest.GetBrowsingContextTree.cs
Add test for retrieving browsing context tree
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.GetBrowsingContextTree.cs
BrowsingContextTest.NavigateToUrl.cs
Add tests for URL navigation
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.NavigateToUrl.cs
BrowsingContextTest.NavigationStartedEvent.cs
Add test for NavigationStartedEvent
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.NavigationStartedEvent.cs
BrowsingContextTest.UserPromptEvent.cs
Add tests for user prompt events
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.UserPromptEvent.cs
BrowsingContextTest.cs
Create BrowsingContextTest partial class
examples/dotnet/SeleniumDocs/BiDi/BrowsingContext/BrowsingContextTest.cs
1 files
NuGet.config
Add GitHub Packages to NuGet sources
examples/dotnet/SeleniumDocs/NuGet.config
1 files
SeleniumDocs.csproj
Update Selenium.WebDriver package version
examples/dotnet/SeleniumDocs/SeleniumDocs.csproj