selenium-chromedriver

The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed for Selenium

时间秒杀一切 提交于 2020-01-03 05:28:10
问题 I’m running a jupyter notebook on ubuntu server. I’m trying run the selenium code below using chromedriver. I’m getting the error below but if I run the line of code below in Ubuntu terminal it returns the output below. Does anyone know what the issue might be? I’m still pretty new to ubuntu. Ubuntu code: which google-chrome output: /usr/bin/google-chrome jupyter notebook code: driver = webdriver.Chrome(executable_path=os.path.abspath("/home/username/chromedriver"), chrome_options=chrome

Selenium Grid 2 - Chromedriver does not start a new profile on a new run

大城市里の小女人 提交于 2020-01-03 05:26:22
问题 While testing a website on Chrome using selenium webdriver ( chromedriver ) with ruby and selenium grid 2 , I manually clicked on Allow to track my location. Since then every new run starts off with the Chrome browser tracking my location and not asking for permission anymore. In my understanding that should not happen, as Selenium should create a new profile and not remember any user interactions in the previous run. I have also tried to open the Chrome Browser as an admin (manually) and

Run UI Tests using Selenium (WebDriver) as different user

巧了我就是萌 提交于 2020-01-03 04:54:08
问题 I want to run UI Tests using selenium (WebDriver) as different user. string[] rolesArray = {"Admin", "Manager"}; Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity("ik\adam.walas@com.pl"), rolesArray); I put these code inside constructor WebDriver . However when I run single UI Test using Visual Studio, the test runs as a user who is logged on computer so my account. How can I solve this issue? I use Chrome as a browser for UI Tests. Should I use selenium chromedriver with

Arguments not being applied to Google chromedriver in Selenium with python

和自甴很熟 提交于 2020-01-03 04:36:21
问题 I'm using selenium with python and chromedriver (webdriver) on OS X (Yosemite) I'm trying to add arguments to my driver instance like so: from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--start-maximized') webdriver.Chrome(executable_path='/Library/Python/2.7/site-packages/selenium/webdriver/chrome/chromedriver', chrome_options=chrome_options) The browser window creates fine but it

Invalid port. Exiting… org.openqa.selenium.os.OsProcess checkForError while launching chrome using selenium

时光总嘲笑我的痴心妄想 提交于 2020-01-03 04:18:10
问题 I am using selenium server standalone jar- 3.11.0, latest ChromeDriver-2.36 and Chrome version 66.0.3359.139 My code import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class WebDriverBasics { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\\Users\\surya\\Downloads\\Compressed\\chromedriver_win32_2\\chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.get("http://www.facebook.com"); driver.manage()

any way to catch a WebElement without using XPath or CssPath

徘徊边缘 提交于 2020-01-03 02:33:08
问题 I am very new at Java and Selenium so my apologies in advance if my question sounds a bit primary. I am using Selenium and Java to write a test. The issue is the application I'm testing is not finished yet and its developers change the code daily. When I use XPath or CssPath it may change after a while, so I have to go through all my test program and change those XPathes or Css ones. Is there any other way that I can have access to a WebElement without using Css or XPath? 回答1: There are

how to export html table data displayed in web page to .csv format

老子叫甜甜 提交于 2020-01-01 22:08:10
问题 How to export the table (table id="cross_rate_markets_stocks_1") at https://in.investing.com/equities/india after selecting any option from the drop down menu the table that is coming needed to be saved it in .csv format. its for my final year project .. i have tried using 3rd party websites but it is capturing all the data of the site but i only need data of (table id="cross_rate_markets_stocks_1") firstly one need to select any value from the drop down with default value BSE Sensex 30 then

Handle the NoSuchElementException in Fluent Wait

六月ゝ 毕业季﹏ 提交于 2020-01-01 16:13:33
问题 I know that in terms of waiting for web element that isn't in the DOM yet, the most efficient is a fluent wait. So my question is: Is there a way to handle and catch the NoSuchElementException or any exception that fluent wait might throw because the element is not existing? I need to have a boolean method wherein it will give me result whether the element is found or not. This method is quite popular on the web. public void waitForElement(WebDriver driver, final By locator){ Wait<WebDriver>

Handle the NoSuchElementException in Fluent Wait

筅森魡賤 提交于 2020-01-01 16:12:22
问题 I know that in terms of waiting for web element that isn't in the DOM yet, the most efficient is a fluent wait. So my question is: Is there a way to handle and catch the NoSuchElementException or any exception that fluent wait might throw because the element is not existing? I need to have a boolean method wherein it will give me result whether the element is found or not. This method is quite popular on the web. public void waitForElement(WebDriver driver, final By locator){ Wait<WebDriver>

How to download a HTML webpage using Selenium with python?

删除回忆录丶 提交于 2020-01-01 06:47:13
问题 I want to download a webpage using selenium with python. using the following code: from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys chromeOptions = webdriver.ChromeOptions() chromeOptions.add_argument('--save-page-as-mhtml') d = DesiredCapabilities.CHROME driver = webdriver.Chrome() driver.get("http://www.yahoo.com") saveas = ActionChains(driver).key_down(Keys.CONTROL)\ .key_down('s').key_up(Keys