Skip to content

Instantly share code, notes, and snippets.

View seleniumgists's full-sized avatar

seleniumgists

View GitHub Profile
@seleniumgists
seleniumgists / file.js
Created August 3, 2020 06:16
generated automatically from #selenium on seleniumhq slack
chrome_options = Selenium::WebDriver::Chrome::Options.new
experimentalFlags = ['enable-webrtc-hide-local-ips-with-mdns@1']
chromeLocalStatePrefs = { 'browser.enabled_labs_experiments' => experimentalFlags}
chrome_options.add_option('localState',chromeLocalStatePrefs)
driver = Selenium::WebDriver.for(:chrome, options: chrome_options)
driver.get('<chrome://flags/#enable-webrtc-hide-local-ips-with-mdns>')
@seleniumgists
seleniumgists / Untitled
Created October 24, 2019 13:46
generated automatically from #selenium on seleniumhq slack
world.js
require('chromedriver')
const { setWorldConstructor } = require('cucumber')
const webDriver = require('selenium-webdriver')
const chrome = require('selenium-webdriver/chrome')
const chromiumBinary = require('chromium-binary')
var { Before, BeforeAll, AfterAll, After } = require('cucumber')
let driver
@seleniumgists
seleniumgists / file.m
Created November 13, 2020 08:03
generated automatically from #selenium on seleniumhq slack
<documentRoot>
<!-- Test data -->
<?value="2"?>
<parent name="data" >
<child id="1" name="alpha" >Some Text</child>
<child id="2" name="beta" >
<grandchild id="2.1" name="beta-alpha" ></grandchild>
<grandchild id="2.2" name="beta-beta" ></grandchild>
</child>
<pet name="tigger" type="cat" >
@seleniumgists
seleniumgists / file.css
Created November 11, 2020 10:31
generated automatically from #selenium on seleniumhq slack
/home/user/repo/selenium/javascript/node/selenium-webdriver/devtools/generator/protocol-dts-generator.js:3: ERROR - [JSC_GOOG_MODULE_REFERENCES_THIS] The body of a goog.module cannot reference this.
(this && this.__spreadArrays) ||
^^^^
/home/user/repo/selenium/javascript/node/selenium-webdriver/devtools/generator/protocol-dts-generator.js:3: ERROR - [JSC_GOOG_MODULE_REFERENCES_THIS] The body of a goog.module cannot reference this.
(this && this.__spreadArrays) ||
^^^^
2 error(s), 195 warning(s), 92.5% typed
Compilation failed; aborting...
@seleniumgists
seleniumgists / file.cpp
Created November 10, 2020 17:17
generated automatically from #selenium on seleniumhq slack
using DevToolsSession session = driver.CreateDevToolsSession();
await session.Start();
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V87.DevToolsSessionDomains>();
await domains.Accessibility.Enable();
@seleniumgists
seleniumgists / file.css
Created November 9, 2020 09:12
generated automatically from #selenium on seleniumhq slack
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>4.2.2</version>
<scope>test</scope>
</dependency>
@seleniumgists
seleniumgists / file.m
Created November 6, 2020 15:38
generated automatically from #selenium on seleniumhq slack
if ((this as ISupportsLogs) != null)
{
// Only add the legacy log commands if the driver supports
// retrieving the logs via the extension end points.
this.CommandExecutor.CommandInfoRepository.TryAddCommand(DriverCommand.GetAvailableLogTypes, new CommandInfo(CommandInfo.GetCommand, "/session/{sessionId}/se/log/types"));
this.CommandExecutor.CommandInfoRepository.TryAddCommand(DriverCommand.GetLog, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/se/log"));
}
@seleniumgists
seleniumgists / file.css
Created November 4, 2020 16:59
generated automatically from #selenium on seleniumhq slack
{
"lastStarted": "1970-01-01T00:00:00Z",
"stereotype": {
"browserName": "chrome"
},
@seleniumgists
seleniumgists / file.m
Created November 3, 2020 10:43
generated automatically from #selenium on seleniumhq slack
Scrolled to bottom we have
# iPhone 8 iOS 13
@component.heading.native.rect
=> #<struct Selenium::WebDriver::Rectangle x=17, y=1, width=320, height=48>
# Chrome Linux
@component.heading.native.rect
=> #<struct Selenium::WebDriver::Rectangle x=17, y=1086, width=750, height=48>
@seleniumgists
seleniumgists / file.m
Created November 3, 2020 03:36
generated automatically from #selenium on seleniumhq slack
Does anyone know, how to resolve the following behavior - Chrome is launched but no further action is performed by driver even maximizing the browser and the error "Chrome not reachable" is thrown.