Skip to content

Commit 75a583b

Browse files
committed
Add ContextLocator
1 parent 81974bb commit 75a583b

File tree

1 file changed

+6
-0
lines changed
  • dotnet/src/webdriver/BiDi/Modules/BrowsingContext

1 file changed

+6
-0
lines changed

dotnet/src/webdriver/BiDi/Modules/BrowsingContext/Locator.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace OpenQA.Selenium.BiDi.Modules.BrowsingContext;
2424
[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
2525
[JsonDerivedType(typeof(AccessibilityLocator), "accessibility")]
2626
[JsonDerivedType(typeof(CssLocator), "css")]
27+
[JsonDerivedType(typeof(ContextLocator), "context")]
2728
[JsonDerivedType(typeof(InnerTextLocator), "innerText")]
2829
[JsonDerivedType(typeof(XPathLocator), "xpath")]
2930
public abstract record Locator;
@@ -39,6 +40,11 @@ public record AccessibilityLocatorValue
3940

4041
public record CssLocator(string Value) : Locator;
4142

43+
public record ContextLocator(ContextLocator.ContextLocatorValue Value) : Locator
44+
{
45+
public record ContextLocatorValue(BrowsingContext Context);
46+
}
47+
4248
public record InnerTextLocator(string Value) : Locator
4349
{
4450
public bool? IgnoreCase { get; set; }

0 commit comments

Comments
 (0)