Skip to content

Instantly share code, notes, and snippets.

View seleniumgists's full-sized avatar

seleniumgists

View GitHub Profile
@seleniumgists
seleniumgists / file.m
Created September 28, 2020 17:06
generated automatically from #selenium on seleniumhq slack
Hi –
Sam from Mailinator here !
We did indeed make a change as indicated, however to our surprise it was specifically around html
sanitization of email content. No changes to our site happened.
We're very careful about ever changing HTML structure as we realize users depend on it. Typically we version the entire site when going to new HTML with old versions remaining available.
We've briefly looked at the issue above. If anyone has ideas of what happened, or what we can do to make things more identifiable we'd be interested in hearing them.
@seleniumgists
seleniumgists / file.css
Created September 25, 2020 18:25
generated automatically from #selenium on seleniumhq slack
CRITICAL lib:driver_listener.py:80 Selenium raised java.net.SocketException: Connection reset
CRITICAL lib:driver_listener.py:80 Selenium raised java.net.ConnectException: Connection refused (Connection refused)
@seleniumgists
seleniumgists / file.html
Created September 24, 2020 21:23
generated automatically from #selenium on seleniumhq slack
Wait<WebDriver> wait = new FluentWait<>(driver)
.withTimeout(Duration.ofSeconds(30))
.pollingEvery(Duration.ofMillis(100))
.ignoring(StaleElementReferenceException.class)
.ignoring(NoSuchElementException.class);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(locator));
@seleniumgists
seleniumgists / file.py
Created September 24, 2020 21:20
generated automatically from #selenium on seleniumhq slack
from selenium.webdriver.support import expected_conditions as EC
@seleniumgists
seleniumgists / file.js
Created September 24, 2020 21:19
generated automatically from #selenium on seleniumhq slack
WebDriverWait(driver, 0.5).until(EC.element_to_be_clickable(obj))
@seleniumgists
seleniumgists / file.sh
Created September 23, 2020 19:13
generated automatically from #selenium on seleniumhq slack
pip install seleniumbase
seleniumbase install chromedriver
seleniumbase mkdir ui_tests
cd ui_tests
seleniumbase mkfile new_test.py
pytest new_test.py
@seleniumgists
seleniumgists / file.sh
Created September 23, 2020 19:04
generated automatically from #selenium on seleniumhq slack
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
@seleniumgists
seleniumgists / file.js
Created September 23, 2020 17:57
generated automatically from #selenium on seleniumhq slack
scroll_script = "window.scrollTo(0, 10000);"
driver.execute_script(scroll_script)
@seleniumgists
seleniumgists / file.m
Created September 23, 2020 16:04
generated automatically from #selenium on seleniumhq slack
driver.findElement(By.cssSelector(".menu-btn.btn")).click()```
becomes
```self.click(".menu-btn.btn")
@seleniumgists
seleniumgists / file.html
Created September 18, 2020 08:44
generated automatically from #selenium on seleniumhq slack
FROM maven:3.6.1-jdk-8
WORKDIR /usr/src/mymaven
COPY . .
RUN apt-get update && apt-get install jq -y && chmod +x wait-for-grid.sh