selenium-chromedriver

C# - selenium webdriver unable to open chrome browser window

不想你离开。 提交于 2019-12-11 19:07:21
问题 Below is the selenium script to open chrome browser in C# on Windows 10 Visual Studio Code. I'm using Chrome 74 (64 bit) and corresponding ChromeDriver 74.0.3729.6. One thing to note is Chrome is not installed in default directory. This is due to our Office security purpose. It has installed in a different location. When I run the script It gives me error -Failed to create a Chrome process. Could some one please help me to understand why chrome browser isn't opening? using System; using

ChromeDriver Laravel Dusk Set Download File Path

蓝咒 提交于 2019-12-11 18:08:30
问题 Hi all wanted to ask how to set chromeDriver options default path to a specific directory so that if one downloads file using laravel dusk headless driver, files downloads to the directory. Thanks in advance. 回答1: Try this: $this->browse(function (Browser $browser) { $url = $browser->driver->getCommandExecutor()->getAddressOfRemoteServer(); $uri = '/session/' . $browser->driver->getSessionID() . '/chromium/send_command'; $body = [ 'cmd' => 'Page.setDownloadBehavior', 'params' => ['behavior' =

Select option from context click menu in Chrome

只谈情不闲聊 提交于 2019-12-11 17:58:49
问题 I'm facing an issue in Chrome 47, using Selenium (WebDriver) 2.48.2, ChromeDriver 2.20.353145, and Java as programming language. I couldn't find any solutions online. I need to open the "right click menu of browser" (or context click menu) from an input and I could do this using this code: new Actions(driverExample).contextClick(inputExample).build().perform(); So the next step: select an option from it. I searched online and it seemed simple, but it's not. I didn't try on others browsers,

How do I control Selenium PDF and Excel files download behavior?

可紊 提交于 2019-12-11 17:53:37
问题 I want to download all the tender documents from this url 'http://www.ha.org.hk/haho/ho/bssd/T18G014Pc.htm' I'm using selenium to go through each tender links and download the files. However, my scraper couldn't handle the Excel download behavior. Currently, it handles PDF files pretty well. from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from

Chrome keep asking me for a download location on Selenium Hub/Driver on Python

末鹿安然 提交于 2019-12-11 17:52:29
问题 I'm trying to download a couple of files in a test that are randomly generated on the back-end with a unique name I use this preferences that I pass to the chrome driver both directly or in a selenium hub CHROME_PREFERENCES = { "profile.default_content_settings.popups": 0, "download.prompt_for_download": "false", "download.directory_upgrade": "true", "download.default_directory": "/mnt/hgfs/down/", "profile.default_content_setting_values.notifications": 2, "profile.default_content_setting

Fetching all links in a website using Selenium

自古美人都是妖i 提交于 2019-12-11 17:25:24
问题 I want to fetch all the links in a website and click each one to those. Basically I want to check if that website have any broken links or not? One way I was thinking is to add all the links in home map with key as its text and keep on adding in map till all the links in menu item pages are added and then iterate on map and click on each link. But I know this is not the best solution as we can still miss some links. Does anybody have any other better solution to this? 回答1: You can use the

not opening chrome browser after updating Chrome browser to latest version

杀马特。学长 韩版系。学妹 提交于 2019-12-11 17:13:07
问题 After I've updated google chrome browser to the latest version when I trying to run the browser tab crashing. Error: > selenium.common.exceptions.WebDriverException: Message: session not created exception from disconnected: unable to send message to renderer (Session info: chrome=66.0.3359.139) (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.16299 x86_64) Tried to downrage to chrome v65 and chrome webdriver v2.36 selenium.common

How to launch chromebrowser using chrome options?

给你一囗甜甜゛ 提交于 2019-12-11 17:07:58
问题 Without using The System.setProperty System.setProperty("webdriver.chrome.driver", "F:\\New folder\\chromedriver.exe"); I have tried to launch the chrome browser using chrome options with the below code: ChromeOptions options = new ChromeOptions(); options.setAcceptInsecureCerts(true); options.addArguments("disable-infobars"); driver = new ChromeDriver(options); i have set my chromedriver path in my System variables.It not Working can any figure this out. 回答1: Can you please try below code as

session not created: This version of ChromeDriver only supports Chrome version 74 error with ChromeDriver Chrome using Selenium

随声附和 提交于 2019-12-11 16:54:26
问题 I'm trying to run RSelenium using the rsDriver function, but when I run rD <- rsDriver() I get a message telling me I need a newer version of Chrome: > rD <- rsDriver() checking Selenium Server versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking chromedriver versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking geckodriver versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking phantomjs versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD

What is the difference between WebDriver.SwitchTo().Window() and WebDriver.SwitchTo().Frame()

久未见 提交于 2019-12-11 16:42:30
问题 A few days ago, I had the requirement to make my WebDriver (Chromedriver in that case) switch between 2 tabs on my browser (One of which has been automatically opened by clicking a link). I was able to implement a solution using the following lines ( C# ) var tabs = new List<String>(Driver.WindowHandles); //Switches to the first tab Driver.SwitchTo().Window(tabs[0]); However, I recently came across some implementations that use frames and alerts, which confused me. The documentation has not