google-chrome

Using Selenium without using any browser

99封情书 提交于 2021-02-17 05:06:27
问题 I have been trying to do web automation using selenium,Is there any way to use browser like chrome,firefox without actually installing then, like using some alternate options, or having portable versions of them.If I can use portable versions how do i tell selenium to use it? 回答1: To use the browsers like google-chrome and firefox you have to install the full-blown browser. You can find a detailed discussion in Is Chrome installation needed or only chromedriver when using Selenium? As an

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

Chomedriver “The driver is not executable”

一笑奈何 提交于 2021-02-16 16:16:09
问题 I have my chromedriver and chromedriver.exe right in project folder. I'm creating instance of driver with this code. ChromeOptions options = new ChromeOptions(); DesiredCapabilities capabilities = DesiredCapabilities.firefox(); LoggingPreferences log_prefs = new LoggingPreferences(); log_prefs.enable(LogType.BROWSER, Level.SEVERE); capabilities.setCapability(CapabilityType.LOGGING_PREFS, log_prefs); System.setProperty("webdriver.chrome.driver", "chromedriver"); driver = new ChromeDriver

Is it possible to break away from await Promise.all when any promise has fulfilled (Chrome 80)

南楼画角 提交于 2021-02-16 16:11:24
问题 I need to send a request to multi-servers to see which server will response to my request and if any of them response, I will then further interact with this server. The simplest way is to send my request in sequence, something like this async function probing(servers) { for (const server of servers) { const result = await fetch(server) if (result.status == 200) { return result } } } But I hope to speed up the probing process so I change my code to async function probing(servers) { results =

Can a Chrome extension's event page detect when the browser has finished starting up?

蹲街弑〆低调 提交于 2021-02-16 09:37:07
问题 I have a Chrome extension that tracks the order in which tabs are accessed by listening for tab-related events like tabs.onActivated , onRemoved , etc. It uses an event page instead of a persistent background page to add the event listeners. The tab access order is stored in chrome.storage.local . The extension works fine while in the normal course of using the browser. But when Chrome is first launched and restores the previous session, it reopens the windows in the order they were

Can a Chrome extension's event page detect when the browser has finished starting up?

怎甘沉沦 提交于 2021-02-16 09:34:20
问题 I have a Chrome extension that tracks the order in which tabs are accessed by listening for tab-related events like tabs.onActivated , onRemoved , etc. It uses an event page instead of a persistent background page to add the event listeners. The tab access order is stored in chrome.storage.local . The extension works fine while in the normal course of using the browser. But when Chrome is first launched and restores the previous session, it reopens the windows in the order they were

changing the value of attributes using puppeteer

前提是你 提交于 2021-02-16 09:15:45
问题 I have an element 'input[name=startdate]' with an attribute 'value="2018-06-20"' instead of using puppeteer to interact with the calendar that is used to change the date, is there anyway I can use puppeteer to set the value instead? something like... let newDate = '2018-01-01' value.innerHTML = newDate 回答1: I was able to figure it out and I'm posting it here in case anyone else has the same problem. await page.$eval('input[name=startdate]', e => e.setAttribute("value", "2018-01-01")) If you

changing the value of attributes using puppeteer

狂风中的少年 提交于 2021-02-16 09:15:25
问题 I have an element 'input[name=startdate]' with an attribute 'value="2018-06-20"' instead of using puppeteer to interact with the calendar that is used to change the date, is there anyway I can use puppeteer to set the value instead? something like... let newDate = '2018-01-01' value.innerHTML = newDate 回答1: I was able to figure it out and I'm posting it here in case anyone else has the same problem. await page.$eval('input[name=startdate]', e => e.setAttribute("value", "2018-01-01")) If you