selenium-chromedriver

Docker: using container with headless Selenium Chromedriver

喜你入骨 提交于 2021-02-17 20:56:39
问题 I'm trying to link peroumal1's "docker-chrome-selenium" container to another container with scraping code that uses Selenium. He exposes his container to port 4444 (the default for Selenium), but I'm having trouble accessing it from my scraper container. Here's my docker-compose file: chromedriver: image: eperoumalnaik/docker-chrome-selenium:latest scraper: build: . command: python manage.py scrapy crawl general_course_content volumes: - .:/code ports: - "8000:8000" links: - chromedriver and

Docker: using container with headless Selenium Chromedriver

随声附和 提交于 2021-02-17 20:56:37
问题 I'm trying to link peroumal1's "docker-chrome-selenium" container to another container with scraping code that uses Selenium. He exposes his container to port 4444 (the default for Selenium), but I'm having trouble accessing it from my scraper container. Here's my docker-compose file: chromedriver: image: eperoumalnaik/docker-chrome-selenium:latest scraper: build: . command: python manage.py scrapy crawl general_course_content volumes: - .:/code ports: - "8000:8000" links: - chromedriver and

How to run a Java Selenium test on an incognito Google Chrome profile

本小妞迷上赌 提交于 2021-02-17 06:43:06
问题 I hope that you're fine. I'm trying to run a certain test on a certain profile but using incognito mode here what I did, it opens the incognito WebDriver of the profile but it doesn't run the test: import org.openqa.selenium.By; import org.openqa.selenium.By.ByXPath; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; //import

Creating New Tabs and Managing Them - Selenium

[亡魂溺海] 提交于 2021-02-17 05:24:19
问题 Here is my Code: var chromeOptions = new ChromeOptions(); chromeOptions.AddArguments("headless"); _driver = new OpenQA.Selenium.Chrome.ChromeDriver(chromeOptions); _driver.Navigate().GoToUrl(url); It will open an instance of chromedriver.exe and will navigate to the target URL. I need to navigate to other URLs with the same chromedriver.exe intance, and I need to set specific headers and cookies for each URL. How to achieve something with Selenium and ChromeDriver? 回答1: Personally, i;d do

Why local chrome-urls like: chrome://downloads or chrome://apps doesn't work in headless mode?

淺唱寂寞╮ 提交于 2021-02-17 03:30:32
问题 I am trying to visit chrome local urls. But it's not working. Does headless chrome support local urls? 回答1: I was looking for exactly this just today. Found this: Most chrome internal pages are not implemented in headless mode. This is a limitation of headless Chrome itself, and is not related to ChromeDriver. If you need a particular internal page available in headless Chrome, please file a feature request at https://crbug.com/. :( citation 来源: https://stackoverflow.com/questions/57004031

Why local chrome-urls like: chrome://downloads or chrome://apps doesn't work in headless mode?

落爺英雄遲暮 提交于 2021-02-17 03:28:25
问题 I am trying to visit chrome local urls. But it's not working. Does headless chrome support local urls? 回答1: I was looking for exactly this just today. Found this: Most chrome internal pages are not implemented in headless mode. This is a limitation of headless Chrome itself, and is not related to ChromeDriver. If you need a particular internal page available in headless Chrome, please file a feature request at https://crbug.com/. :( citation 来源: https://stackoverflow.com/questions/57004031

Condition to check if Selenium is done scrolling based on web element?

℡╲_俬逩灬. 提交于 2021-02-17 01:54:08
问题 Currently I have a script that will go to TripAdvisor and try to scrape every image in that particular filter. I was wondering what conditional I should set my if statement to in order for it to break out of the while loop and then parse the list of urls to give me clear url links to each image. I am just confused at how I can tell if I have reached the end once I have reached the last web element. The if statement is right at the end before the last printing loop. Any help is greatly

selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/google-chrome unexpectedly exited with ChromeDriver Selenium Python on Linux

早过忘川 提交于 2021-02-16 21:15:53
问题 from selenium import webdriver driver = webdriver.Chrome(executable_path=r'/usr/local/bin/google-chrome') driver.get('https://www.google.co.in') print("Page Title is : %s" %driver.title) driver.quit() I receive this error: File "test.py", line 5, in <module> driver = webdriver.Chrome(executable_path=r'/usr/bin/google-chrome') File "/usr/local/python3/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__ self.service.start() File "/usr/local/python3/lib

org.openqa.selenium.WebDriverException: disconnected: received Inspector.detached event error during test execution using Selenium and Chromedriver

会有一股神秘感。 提交于 2021-02-16 21:07:49
问题 I know that Selenium is an automated testing tool, but i'm trying to use it for RPA instead (things to do with my work environment) I've gotten the java code down, and it runs exactly how i want it. It takes data from an excel sheet, converts the data into java objects, then enters data into a web application. It works fine for the first 20-25 entries, then starts to slow down, and eventually crashes the application. I have a few thousand rows to enter. I've tried starting the chrome

org.openqa.selenium.WebDriverException: disconnected: received Inspector.detached event error during test execution using Selenium and Chromedriver

霸气de小男生 提交于 2021-02-16 21:07:03
问题 I know that Selenium is an automated testing tool, but i'm trying to use it for RPA instead (things to do with my work environment) I've gotten the java code down, and it runs exactly how i want it. It takes data from an excel sheet, converts the data into java objects, then enters data into a web application. It works fine for the first 20-25 entries, then starts to slow down, and eventually crashes the application. I have a few thousand rows to enter. I've tried starting the chrome