Skip to content

Instantly share code, notes, and snippets.

View seleniumgists's full-sized avatar

seleniumgists

View GitHub Profile
@seleniumgists
seleniumgists / Untitled
Created August 27, 2020 18:12
generated automatically from #selenium on seleniumhq slack
private static final String URL = "https://www.linkedin.com/home";
private static final String EMAIL = "[email protected]";
private static final String TEXT = "Hola Selenium 4 (alpha 6) - automated, hola LINKEDin";
private static final String PWD = "blah blah"; // pasword changed for obvious reasons
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "/Users/test/personal/selenium/chromedriver");
@seleniumgists
seleniumgists / file.html
Created August 27, 2020 15:12
generated automatically from #selenium on seleniumhq slack
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/assets/displayhelpservlet.css" media="all"/>
<link href="/assets/favicon.ico" rel="icon" type="image/x-icon" />
<script src="/assets/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="/assets/displayhelpservlet.js" type="text/javascript"></script>
<script type="text/javascript">
var json = Object.freeze('{"consoleLink": "\u002fgrid\u002fconsole","type": "Grid Hub","class": "org.openqa.grid.web.servlet.DisplayHelpHandler$DisplayHelpServletConfig","version": "3.141.59"}');
</script>
</head>
@seleniumgists
seleniumgists / file.m
Created August 26, 2020 20:56
generated automatically from #selenium on seleniumhq slack
By.cssSelector
@seleniumgists
seleniumgists / file.html
Created August 26, 2020 20:54
generated automatically from #selenium on seleniumhq slack
By.XPath("//input[@value='GET TIPS']")
@seleniumgists
seleniumgists / file.m
Created August 26, 2020 20:48
generated automatically from #selenium on seleniumhq slack
final WebElement submitEmail = wait.until(ExpectedConditions.presenceOfElementLocated(By.tagName("submit")));
submitEmail.click();
@seleniumgists
seleniumgists / Untitled
Created August 26, 2020 20:48
generated automatically from #selenium on seleniumhq slack
<input type="submit" value="GET TIPS" data-wait="Please wait..." class="button-2 bg-blue w-button">
@seleniumgists
seleniumgists / file.css
Created August 26, 2020 16:52
generated automatically from #selenium on seleniumhq slack
//To wait for element visible
final WebDriverWait wait;
wait = new WebDriverWait(driver, Duration.ofSeconds(15), Duration.ofMillis(100));
Thread.sleep(15000);
final WebElement noGracias;
noGracias = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(("img[src='<https://images.clarin.com/collections/static/logo_clarin.svg>']"))));
noGracias.click();
@seleniumgists
seleniumgists / Untitled
Created August 26, 2020 15:20
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 TestClarinChrome {
@seleniumgists
seleniumgists / Untitled
Last active August 25, 2020 17:45
generated automatically from #selenium on seleniumhq slack
const { Builder, Capabilities } = require('selenium-webdriver');
//var firefox = require('selenium-webdriver/firefox');
const chrome = require('selenium-webdriver/chrome');
const chromeOptions = new chrome.Options();
chromeOptions.addArguments(["--ignore-certificate-errors",
"--allow-running-insecure-content",
"--disable-extensions",
"--start-maximized"]);
@seleniumgists
seleniumgists / file.css
Created August 25, 2020 15:44
generated automatically from #selenium on seleniumhq slack
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(15), Duration.ofMillis(100));
WebElement usernameField = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("input[data-test-id='SignIn-Username']")));