selenium-webdriver

docker selenium/standalone-chrome unable to connect to docker web server

ⅰ亾dé卋堺 提交于 2020-05-29 16:14:33
问题 I am trying to use codeception to run tests for a php web site which was developed using docker containers. I created a test folder in the web container and put there codecept.phar. This is the project's setup: docker-compose.yml: version: '3' services: db: image: mariadb restart: always volumes: - ./db:/var/lib/mysql ports: - '3306:3306' environment: MYSQL_ROOT_PASSWORD: root web: build: . restart: always tty: true volumes: - ./src:/var/www - ./build/php.ini:/usr/local/etc/php/php.ini ports:

docker selenium/standalone-chrome unable to connect to docker web server

寵の児 提交于 2020-05-29 16:14:26
问题 I am trying to use codeception to run tests for a php web site which was developed using docker containers. I created a test folder in the web container and put there codecept.phar. This is the project's setup: docker-compose.yml: version: '3' services: db: image: mariadb restart: always volumes: - ./db:/var/lib/mysql ports: - '3306:3306' environment: MYSQL_ROOT_PASSWORD: root web: build: . restart: always tty: true volumes: - ./src:/var/www - ./build/php.ini:/usr/local/etc/php/php.ini ports:

Need help web scraping table with beautifulsoup and selenium webdriver

一个人想着一个人 提交于 2020-05-28 04:45:08
问题 So I am working on trying to webscrape https://data.bls.gov/cgi-bin/surveymost?bls and was able to figure out how to webcrawl through clicks to get to a table. The selection that I am practicing on is after you select the checkbox associated with " Employment Cost Index (ECI) Civilian (Unadjusted) - CIU1010000000000A" under Compensation and then select "Retrieve data". Once those two are processed a table shows. This is the table I am trying to scrape. Below is the code that I have as of

Selenium webdriver python, cannot find by value?

柔情痞子 提交于 2020-05-27 13:02:13
问题 I'm trying to select one of three checkboxes on a page but the source code for them looks like this: <input type="radio" name="Option" value="1"> <input type="radio" name="Option" value="2"> <input type="radio" name="Option" value="3"> So the only thing differentiating them is value, but there is no find_element_by_value. How would I go about switching between these 3 checkboxes? 回答1: You can use xpath for identification of elements in such cases, browser.find_element_by_xpath("//input[@value

Selenium webdriver python, cannot find by value?

≡放荡痞女 提交于 2020-05-27 13:02:01
问题 I'm trying to select one of three checkboxes on a page but the source code for them looks like this: <input type="radio" name="Option" value="1"> <input type="radio" name="Option" value="2"> <input type="radio" name="Option" value="3"> So the only thing differentiating them is value, but there is no find_element_by_value. How would I go about switching between these 3 checkboxes? 回答1: You can use xpath for identification of elements in such cases, browser.find_element_by_xpath("//input[@value

Chrome is not stable on my jenkins and ubuntu 18.04

落爺英雄遲暮 提交于 2020-05-27 04:59:09
问题 Chrome is not stable on my Jenkins. When I run build 5 times, it runs 1 - 2-time success, and the other 3 times I have the above error. Code for Chrome : ChromeOptions options = new ChromeOptions(); System.setProperty("webdriver.chrome.driver","/usr/local/bin/chromedriver"); options.addArguments("--headless"); options.addArguments("--no-sandbox"); options.addArguments("--disable-dev-shm-usage"); driver = new ChromeDriver(options); driver.get("https://mywebsite.com"); Some steps I have already

Selenium Post method

爷,独闯天下 提交于 2020-05-26 04:36:07
问题 I'm trying to find a way to get the response of a post method executed through headless browser. session = requests.Session() session.get(<url here) print session.cookies r = session.post(url).content print r The problem is that the response r is full of javascript and I can't use Selenium to execute it because it doesn't support the POST method (as far as I know). Any ideas? 回答1: You can try using selenium-requests: Extends Selenium WebDriver classes to include the request function from the

Where is the documentation of Selenium Webdriver for NodeJS?

和自甴很熟 提交于 2020-05-25 03:38:06
问题 I don't seem to find any, the only one I always find is this one: https://code.google.com/p/selenium/wiki/WebDriverJs But it is more a guide. Not a documentation of all functions. It lacks for example the documentation for Webdriver.Window , or something like getWindowHandles() 回答1: I always need to re-find this, so I might as well capture it here http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/ 回答2: The best way I found is to look at the source code itself

Where is the documentation of Selenium Webdriver for NodeJS?

天大地大妈咪最大 提交于 2020-05-25 03:37:11
问题 I don't seem to find any, the only one I always find is this one: https://code.google.com/p/selenium/wiki/WebDriverJs But it is more a guide. Not a documentation of all functions. It lacks for example the documentation for Webdriver.Window , or something like getWindowHandles() 回答1: I always need to re-find this, so I might as well capture it here http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/ 回答2: The best way I found is to look at the source code itself

org.openqa.selenium.SessionNotCreatedException: session not created disconnected:unable to send message to renderer error with ChromeDriver and Chrome

China☆狼群 提交于 2020-05-24 07:42:56
问题 I try to run this simple program on Java with Selenium: import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class MySelenium { public static void main(String[] args) { System.out.println("First Selenium"); System.setProperty("webdriver.chrome.driver", "C:\\automation\\drivers\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://www.seleniumhq.org/"); driver.quit(); } } But on running shows the following error: How can i fixed