Skip to content

Instantly share code, notes, and snippets.

View seleniumgists's full-sized avatar

seleniumgists

View GitHub Profile
@seleniumgists
seleniumgists / file.css
Created May 27, 2020 19:09
generated automatically from #selenium on seleniumhq slack
touch drivers
mv home/chromedriver drivers
chmod 777 drivers/chromedriver
@seleniumgists
seleniumgists / file.cpp
Created May 26, 2020 13:28
generated automatically from #selenium on seleniumhq slack
var x = new ToolTipData();
action
.MoveToCell(this.Elem)
.FindElement(xPath, x)
.Build()
.Perform();
//var wait = new WebDriverWait(this.Driver, new TimeSpan(0, 0, 2));
@seleniumgists
seleniumgists / file.css
Created May 25, 2020 18:38
generated automatically from #selenium on seleniumhq slack
> chromedriver --version
ChromeDriver 81.0.4044.69 (6813546031a4bc83f717a2ef7cd4ac6ec1199132-refs/branch-heads/4044@{#776})
@seleniumgists
seleniumgists / file.py
Created May 21, 2020 08:36
generated automatically from #selenium on seleniumhq slack
protected static WebElement getElement(By locator) {
try {
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(Constants.MAX_WAIT_SECONDS_EXPLICIT));
wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
} catch (Exception tex) {
logOutput("FAIL", tex.getMessage());
}
if (!driver.findElements(locator).isEmpty()) {
return driver.findElements(locator).get(0);
@seleniumgists
seleniumgists / file.cpp
Created May 20, 2020 14:14
generated automatically from #selenium on seleniumhq slack
[adam@box infra]$ date && kubectl scale deployment selenium-node-chrome --replicas=3
śro, 20 maj 2020, 16:10:16 CEST
deployment.apps/selenium-node-chrome scaled
[adam@box infra]$ date && kubectl get pods | grep selenium
śro, 20 maj 2020, 16:10:31 CEST
selenium-hub-9cbc59c95-gtkr2 1/1 Running 0 64s
selenium-node-chrome-79479f4b4f-glqp4 1/1 Running 0 42s
selenium-node-chrome-79479f4b4f-grvdz 1/1 Running 0 42s
selenium-node-chrome-79479f4b4f-ncmfg 1/1 Running 0 42s```
and in hub logs:
@seleniumgists
seleniumgists / file.css
Created May 19, 2020 18:54
generated automatically from #selenium on seleniumhq slack
[8:38 AM] #
# This docker-compose configuration runs tests against stage or prod depending on target
#
version: '3'
networks:
piq_customer_ui:
driver: bridge
@seleniumgists
seleniumgists / file.cpp
Created May 19, 2020 18:54
generated automatically from #selenium on seleniumhq slack
var config = require('./base.conf.js').config;
config.seleniumAddress = '<http://selenium-hub:4444>';
config.capabilities = {
'browserName': 'chrome',
'goog:chromeOptions': {
'args': ["--start-maximized", "--silent", "--log-level=3"],
'prefs': {
'download': {
'prompt_for_download': false,
@seleniumgists
seleniumgists / file.css
Created May 19, 2020 14:57
generated automatically from #selenium on seleniumhq slack
volumes:
- /tmp/videos:/home/seluser/videos
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- /tmp/downloads:/home/seluser/downloads
@seleniumgists
seleniumgists / file.rb
Created May 19, 2020 10:36
generated automatically from #selenium on seleniumhq slack
SE_OPTS=-"acceptInsecureCerts"=true
@seleniumgists
seleniumgists / file.py
Created May 19, 2020 10:12
generated automatically from #selenium on seleniumhq slack
[0;36mConnecting to seleniumhost on port 443...
[0m
[1;31m POST <https://seleniumhost:443> /wd/hub/session - UNABLE_TO_GET_ISSUER_CERT
Error: unable to get issuer certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1474:34)
at TLSSocket._finishInit (_tls_wrap.js:917:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:687:12)[0m
â  [0;31mError connecting to seleniumhost on port 443.[0m