Skip to content

Instantly share code, notes, and snippets.

View seleniumgists's full-sized avatar

seleniumgists

View GitHub Profile
@seleniumgists
seleniumgists / file.css
Created June 4, 2020 20:47
generated automatically from #selenium on seleniumhq slack
selenium-side-runner --base-url <https://localhost:8080> -c "browserName=chrome" --filter Create_New_Application --param "Name='qaSeleniumJune42020'"
@seleniumgists
seleniumgists / file.cpp
Created June 2, 2020 12:22
generated automatically from #selenium on seleniumhq slack
static void Main(string[] args)
{
var profile = new FirefoxProfile();
var options = new FirefoxOptions();
profile.AddExtension("Touch_VPN.xpi");
options.Profile = profile;
var driver = new FirefoxDriver(options);
}
@seleniumgists
seleniumgists / file.cpp
Created June 2, 2020 12:21
generated automatically from #selenium on seleniumhq slack
static void Main(string[] args)
{
var options = new FirefoxOptions();
options.Profile = new FirefoxProfile();
options.Profile.AddExtension("Touch_VPN.xpi");
var driver = new FirefoxDriver(options);
@seleniumgists
seleniumgists / file.m
Created June 2, 2020 12:20
generated automatically from #selenium on seleniumhq slack
OpenQA.Selenium.WebDriverException: 'Cannot find a file named 'C:\Users\Pedro\source\repos\Selenium 4 Test\Selenium 4 Test\bin\Debug\webdriver_prefs.json' or an embedded resource with the id 'webdriver_preferences.json'.'
@seleniumgists
seleniumgists / file.cpp
Created June 1, 2020 21:36
generated automatically from #selenium on seleniumhq slack
"capabilities":
[
{
"browserName": "MicrosoftEdge",
"maxInstances": 1,
"seleniumProtocol": "WebDriver",
"version": "18.17763"
}
],```
How I create the EdgeOptions:
@seleniumgists
seleniumgists / file.css
Created June 1, 2020 16:58
generated automatically from #selenium on seleniumhq slack
browser.set_context("chrome")
win = browser.find_element_by_tag_name("body")
for i in range(5): win.send_keys(Keys.CONTROL + "-")
browser.set_context("content")
@seleniumgists
seleniumgists / file.cpp
Created June 1, 2020 16:37
generated automatically from #selenium on seleniumhq slack
WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
(Session info: chrome=83.0.4103.61)
(Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Mac OS X 10.15.2 x86_64)
@seleniumgists
seleniumgists / file.css
Created May 28, 2020 10:05
generated automatically from #selenium on seleniumhq slack
# Searching element of jQuery HTML popup and click on it
24 driver.find_element_by_xpath("/html/body/div[1]/div[1]/header/div/div[1]/div/div/div[2]/div[1]/div[2]/div/span").click()
25 # Waiting for presence of element
26 WebDriverWait(driver, 10).until(
27 EC.presence_of_all_elements_located((By.XPATH, "//*[@id='logEmailInput']//*[@id='input-32']"))
28 )
29 # Send creds to login popup
30 driver.find_elements_by_xpath("//*[@id='logEmailInput']//*[@id='input-32']").send_keys("<mailto:newcrmtestreal1@dd.com|newcrmtestreal1@dd.com>")
31 driver.find_elements_by_xpath("//*[@id='password']//*[@id='input-37']").send_keys("1Q2w3e4r")
32 # Click on login button
@seleniumgists
seleniumgists / file.cpp
Created May 28, 2020 10:01
generated automatically from #selenium on seleniumhq slack
HTML Report Generated at: /home/ubuntu/workspace/oneapihub-ui@2/test/e2e/reports/report.html
Error: Exited with code 3
at ChildProcess.<anonymous> (/home/ubuntu/workspace/oneapihub-ui@2/node_modules/nightwatch-html-reporter/node_modules/opn/index.js:85:13)
at Object.onceWrapper (events.js:417:26)
at ChildProcess.emit (events.js:310:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:310:20)
at Pipe.<anonymous> (net.js:672:12)
[1;31m_________________________________________________[0m
@seleniumgists
seleniumgists / Sans titre
Created May 27, 2020 20:07
generated automatically from #selenium on seleniumhq slack
org.openqa.selenium.ElementNotInteractableException: element not interactable: element has zero size