Skip to content

Instantly share code, notes, and snippets.

View seleniumgists's full-sized avatar

seleniumgists

View GitHub Profile
@seleniumgists
seleniumgists / file.m
Created July 29, 2020 12:54
generated automatically from #selenium on seleniumhq slack
{
"value": {
"ready": false,
"message": "Selenium Grid not ready.",
"nodes": []
}
}
@seleniumgists
seleniumgists / file.css
Created July 29, 2020 12:45
generated automatically from #selenium on seleniumhq slack
{
"value": {
"error": "unknown command",
"message": "Unable to find handler for (GET) /grid/console",
"stacktrace": ""
}
}
@seleniumgists
seleniumgists / file.css
Created July 23, 2020 14:22
generated automatically from #selenium on seleniumhq slack
driver.find_element_by_xpath("//div[@aria-rowindex=7][@aria-colindex=10]//child::span[1]").click() #click will take me to a new ajax page - no change in url
driver.implicitly_wait(60)
time.sleep(160) #without this the below a.png is still behind before my previous click
driver.save_screenshot('a.png') #new url page is in screenshot properly.
#working fine until this line
driver.implicitly_wait(60)
print(driver.page_source) #still in old page's page_source and the below xpath is not available here
WebDriverWait(driver, 60).until(EC.element_to_be_clickable((By.XPATH, "//button[@button_id='fuseBlowView']"))).click()
@seleniumgists
seleniumgists / file.js
Created July 23, 2020 14:13
generated automatically from #selenium on seleniumhq slack
if(content == undefined){
// doSomething
}
@seleniumgists
seleniumgists / file.cpp
Created July 21, 2020 06:52
generated automatically from #selenium on seleniumhq slack
$ docker network create grid
$ docker run -d -p 4444:4444 --net grid --name selenium-hub selenium/hub:4.0.0-alpha-6-20200720
$ docker run -d --net grid -e HUB_HOST=selenium-hub -v /dev/shm:/dev/shm selenium/node-chrome:4.0.0-alpha-6-20200720
$ docker run -d --net grid -e HUB_HOST=selenium-hub -v /dev/shm:/dev/shm selenium/node-firefox:4.0.0-alpha-6-20200720
@seleniumgists
seleniumgists / file.html
Created July 20, 2020 15:01
generated automatically from #selenium on seleniumhq slack
[8:30 PM] {
"value": {
"error": "unknown command",
"message": "Unable to find handler for (GET) \u002fgrid\u002fconsole",
"stacktrace": ""
}
}
@seleniumgists
seleniumgists / file.sh
Created July 20, 2020 14:33
generated automatically from #selenium on seleniumhq slack
shm_size: 1g
@seleniumgists
seleniumgists / file.m
Created July 20, 2020 08:35
generated automatically from #selenium on seleniumhq slack
<http://www.nmpa.gov.cn/WS04/CL2061/index.html>
@seleniumgists
seleniumgists / file.html
Created July 18, 2020 19:27
generated automatically from #selenium on seleniumhq slack
def test_registration(driver):
driver = driver.find_element_by_class_name("login").click()
time.sleep(10)
createAcc_email = driver.find_element_by_id('email_create')
createAcc_email.send_keys("<mailto:[email protected]|[email protected]>")
# From driver(index) -> sign in button -> new page
#on new page fill in email feild and submit
def main():
driver = webdriver.Chrome()
@seleniumgists
seleniumgists / file.py
Created July 17, 2020 09:34
generated automatically from #selenium on seleniumhq slack
"acceptInsecureCerts": True