You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version v4.25.0 of Selenium added some support for WebDriver BiDi (https://w3c.github.io/webdriver-bidi/) this should make it possible to execute javascript asyncronously. I think it'd be good to add extensions for the BrowsingContext to run axe against the page if possible.
BiDi information:
WebDriverOptions (ex: ChromeOptions) need to have UseWebSocketUrl enabled in order to use BiDi
to get a bidi driver use AsBiDiContextAsync on a WebDriver object.
Here is an example of some code using BiDi to get the title of the page asyncronously:
usingOpenQA.Selenium.BiDi;usingOpenQA.Selenium.BiDi.Modules.BrowsingContext;namespaceBidiExample;publicclassBidiTest{publicasyncTaskMyMethod(){varoptions=newChromeOptions{UseWebSocketUrl=true};vardriver=newChromeDriver(options);varbiDiContext=awaitdriver.AsBiDiContextAsync();vartitle=awaitbiDiContext.GetPageTitleAsync();Assert.NotNull(title);}// Here is some example code on how to execute a script and return the value using the BrowsingContext from BiDi:publicstaticasyncTask<string>GetPageTitleAsync(thisBrowsingContextbidiContext){return(awaitbidiContext.Script.EvaluateAsync<StringRemoteValue>("document.title",true)).Value;}}
The text was updated successfully, but these errors were encountered:
Which package is this feature for?
Feature description
Version v4.25.0 of Selenium added some support for WebDriver BiDi (https://w3c.github.io/webdriver-bidi/) this should make it possible to execute javascript asyncronously. I think it'd be good to add extensions for the BrowsingContext to run axe against the page if possible.
BiDi information:
Here is an example of some code using BiDi to get the title of the page asyncronously:
The text was updated successfully, but these errors were encountered: