Skip to content

Instantly share code, notes, and snippets.

View seleniumgists's full-sized avatar

seleniumgists

View GitHub Profile
@seleniumgists
seleniumgists / file.css
Created September 14, 2020 08:41
generated automatically from #selenium on seleniumhq slack
'{"query": "{ grid { nodes { id, uri, status, maxSession, capabilities }, uri, totalSlots, usedSlots, sessionCount } }"}'
@seleniumgists
seleniumgists / file.m
Created September 14, 2020 08:29
generated automatically from #selenium on seleniumhq slack
{
"value": {
"error": "unknown error",
"message": "Unable to determine type from: q. Last 1 characters read: q\nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: 'router', ip: '172.18.0.11', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '1.8.0_265'\nDriver info: driver.version: unknown",
"stacktrace": "org.openqa.selenium.json.JsonException: Unable to determine type from: q. Last 1 characters read: q\nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: 'router', ip: '172.18.0.11', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '1.8.0_265'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.json.JsonInput.peek(JsonInput.java:126)\n\tat org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$6(JsonTypeCoercer.java:140)\n\tat org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:126)\n\tat org.openqa.selenium.json.Json.toType(Json.java:69
@seleniumgists
seleniumgists / file.sh
Created September 13, 2020 17:20
generated automatically from #selenium on seleniumhq slack
navigator.mediaDevices.getUserMedia
@seleniumgists
seleniumgists / file.m
Created September 10, 2020 00:37
generated automatically from #selenium on seleniumhq slack
let chrome = require("selenium-webdriver/chrome");
let options = new chrome.Options();
options.addExtensions("/path/to/build.crx")
let driver = new webdriver.Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build();```
```selenium_1 | console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290
selenium_1 | SessionNotCreatedError: Unable to create session for <CreateSessionRequest with Capabilities {browserName: chrome, goog:chromeOptions: {extensions: [build.crx]}}>
selenium_1 | Build info: version: '4.0.0-alpha-7', revision: '117b9d61c9'
@seleniumgists
seleniumgists / file.cpp
Created September 9, 2020 22:26
generated automatically from #selenium on seleniumhq slack
let chromeCapabilities = Capabilities.chrome()
let chromeOptions = {
'args': ['load-extension=/app/build']
}
chromeCapabilities.set('chromeOptions', chromeOptions)
export const driver = new Builder()
.forBrowser('chrome')
@seleniumgists
seleniumgists / file.m
Created September 9, 2020 20:01
generated automatically from #selenium on seleniumhq slack
org.openqa.selenium.ElementNotInteractableException: The command failed because the specified element is not pointer or keyboard interactable.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'xxxxxx', ip: 'xxxxxx', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13.0.2'
Driver info: org.openqa.selenium.edge.EdgeDriver
Capabilities {acceptInsecureCerts: false, browserName: MicrosoftEdge, browserVersion: 44.18362.449.0, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}}```
I tried to the below
```JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].style.display = 'block';", driver.findElement(By.cssSelector("input[type='file']")));
driver.findElement(By.cssSelector("input[type='file']")).sendKeys("xxxx")
@seleniumgists
seleniumgists / Untitled
Created August 28, 2020 23:29
generated automatically from #selenium on seleniumhq slack
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
public class TestAtlassianJRAChrome {
@seleniumgists
seleniumgists / file.py
Created August 28, 2020 23:21
generated automatically from #selenium on seleniumhq slack
ExpectedConditions.elementToBeClickable instead of ExpectedConditions.visibilityOfElementLocated
@seleniumgists
seleniumgists / alternatives to get the following UI component ? Selenium 4 Alpha 6
Created August 28, 2020 21:39
generated automatically from #selenium on seleniumhq slack
<input type="password" class="whsOnd zHQkBf" jsname="YPqjbf" autocomplete="current-password" spellcheck="false" tabindex="0" aria-label="Ingresa tu contraseña" name="password" autocapitalize="off" dir="ltr" data-initial-dir="ltr" data-initial-value="">
@seleniumgists
seleniumgists / Untitled
Created August 27, 2020 18:13
generated automatically from #selenium on seleniumhq slack
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=62206:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/H