selenium-chromedriver

Launching Chrome Driver, but not able to do any actions?

荒凉一梦 提交于 2019-12-12 03:38:32
问题 I am trying to run my webdriver tests in Chrome. Here are the steps I'm using to launch Chrome driver: Set the chrome binary path System.setProperty("webdriver.chrome.driver", "paht\\chromedriver.exe"); DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setCapability("chrome.switches", Arrays.asList("--start-maximized")); capabilities.setJavascriptEnabled(true); capabilities.setCapability("AcceptUntrustedCertificates", true); capabilities.setCapability(

How to use *Hot Code Replacement* to correct my xpath of it is incorrect

我的梦境 提交于 2019-12-12 03:33:01
问题 I am using Selenium , Java and Eclipse Mars to write a test. I decided to use Hot Code Replacement to debug my selenium tests. The main reason that I decided to use HCR was to get to my locators (for example: WebElement searchBox = driverChrome.findElement(By.xpath("bla bla")); ) and try the xpath to see if it works or not, and if not I change it, save it and try it again without running the whole test. I have this problem that when I change something and click on save it shows: : Below find

Chrome .Net Ui Automation - Automatic Sign on to Browser - AutomationElement Invoke appears to invoke with no result

北战南征 提交于 2019-12-12 03:14:40
问题 I would like to automatically sign into Chrome on Windows, the Selenium part is done but now there is a Window that needs to be automated. The invocation of the Link data push button. It appears I find the right element with my code and it does attempt an invoke but to no avail. Below snippet is from WPF : using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows

ChromeDriver chrome failed to start [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:53:47
问题 This question already has answers here : ChromeWebDriver - unknown error: Chrome failed to start: crashed (8 answers) Closed last year . I am trying to use the ChromeDriver in Selenium, but Chrome "fails to start." Is there something that might I might be doing wrong? Thank you! My code: public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\\Users\\Bill\\Desktop\\StockBot Workspace\\Files\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver

Going through Chrome://settings by Selenium

旧时模样 提交于 2019-12-12 02:29:07
问题 I am using Java and Selenium to write a test, I use the code below to get into Chrome:setting driverChrome.manage().window().maximize(); driverChrome.get("chrome://settings"); But when the page is open I can not find any of its web Elements, for example when I try to find "show advanced setting...." by this code driverChrome.findElement(By.xpath("//a[@id='advanced-settings-expander']")).click(); it throws an error saying that "no such element: Unable to locate element" I tried to located

Download and open file using Chrome Capybara Selenium

你离开我真会死。 提交于 2019-12-12 00:44:09
问题 I'm writing tests that downloads a PDF and opens it in browser so that I can confirm some content within. I'm struggling to find a solution to configure Chromedriver to download and open instead of saving to the downloads folder (default). Is there a way I can do this? Thanks 回答1: Currently (2015-07-12) this is an open issue in chromedriver. See: https://code.google.com/p/chromedriver/issues/detail?id=1081 for details. You may be able to work-around it by configuring the chrome profile. Based

Changing Chrome's settings with Selenium

五迷三道 提交于 2019-12-12 00:35:34
问题 I'm working on Chrome with Selenium and I'm looking to change a few settings within Chrome using the webdriver. Using Google and this site, I was able to get most of the settings working. However, a few more seem to escape me and hopefully I can get the answers here. I'm looking to alter the settings before launching the browser, such as using ChromeOptions , rather than using automation to navigate the settings page. The settings I'm looking to change are as follows: Disable Javascript

Cant allow notification which may not be an alert [duplicate]

橙三吉。 提交于 2019-12-11 23:38:19
问题 This question already has answers here : How to allow or deny notification geo-location microphone camera pop up (1 answer) How to click Allow on Show Notifications popup using Selenium Webdriver (8 answers) Closed last year . As suggested by @DebanjanB the popup which is clearly visible between the WebDriverWait starts and WebDriverWait ends message may not be an alert. How do we press allow in such case. chrome_options = webdriver.ChromeOptions() prefs = { "profile.default_content_setting

Selenium:Timed out receiving message from renderer exception when switching to new tab

心不动则不痛 提交于 2019-12-11 19:54:51
问题 I am trying to verify the content of PDF. In our application when we click on a link a new tab opens with embedded pdf[No URL in new tab], my task is to verify the content of PDF. I am trying to switch to new PDF and do Ctrl + A and Ctrl + c as below. ArrayList<String> tabs = new ArrayList<String> (driver.getWindowHandles()); for (String string : tabs) { System.out.println("tab id:: "+string); } driver.switchTo().window(tabs.get(1)); driver.switchTo().defaultContent(); System.out.println

scrolling through an element in python3+selenium with chrome webdriver on google maps

两盒软妹~` 提交于 2019-12-11 19:11:21
问题 I want to scroll through some reviews on a restaurant in google maps using selenium chrome webdriver, say Nobu Palo Alto here: https://www.google.com/maps/place/Nobu+Palo+Alto/@37.4437223,-122.1637038,17z/data=!3m1!4b1!4m11!1m3!2m2!1srestaurants!6e5!3m6!1s0x0:0x5bb11772add3928!8m2!3d37.4437179!4d-122.1615154!9m1!1b1 I used this function which seems to get (and print) the javascript height, but instead of infinite scrolling it just breaks after printing the last height == new height, but I