Hot answers tagged

7 votes
Accepted

How can I bring Chrome browser to focus when running a Selenium test using ChromeDriver on Mac?

If you're talking about bringing the browser's window within the OS to the foreground. Selenium cannot do that. You need to introduce a library that is able to automate actions on an OS level. ...
Julian's user avatar
  • 904
6 votes
Accepted

Force a browser's visibility setting to true

It's possible to force this status with a Javascript injection via execute_script. To simulate a visible document: Object.defineProperty(document, 'visibilityState', {value: 'visible', writable: ...
Florent B.'s user avatar
6 votes

Enable Flash player on Chrome 62 while running selenium test

Correct Chrome blocks flash by default starting with Chrome 62 see https://support.google.com/chrome/a/answer/7084871?hl=en This worked for me in Chrome 62, its a combination of answers already ...
user3657964's user avatar
4 votes
Accepted

How to disable user from closing the browser until Test Execution is complete ? using Selenium Webdriver & Chrome

While Selenium can not prevent users from closing the browser, there are other ways you can achieve uninterrupted test execution. Option 1: Use headless chrome With chrome v60+ for windows, you can ...
HaC's user avatar
  • 220
4 votes

How can I bring Chrome browser to focus when running a Selenium test using ChromeDriver on Mac?

To bring the window to front, in C# I use this : protected void BringWindowToFront() { var window = Driver.Manage ().Window; var position = window.Position; window.Minimize(); window....
Alexis Pautrot's user avatar
4 votes

Disable physical mouse and keyboard in selenium

You should not be running tests on a machine used by user(s). Set up a dedicated computer or VM for testing and and use headless browser mode (more info here and here).
Prome's user avatar
  • 1,014
3 votes

Selenium + Chrome browser : How to Validate Downloaded file after clicking on downloaded button/ link using Selenium

Create a digital signature of a valid file After download get the signature of downloaded file Compare the signatures. If they are the same the download is valid. You can use the MD5 command line ...
Niels van Reijmersdal's user avatar
3 votes

Selenium + Chrome browser : How to Validate Downloaded file after clicking on downloaded button/ link using Selenium

It is unclear what do you mean by "Validate". If you are downloading a document and your target is to check its content the question is not related to Selenium as Selenium is browser automation ...
Dmitri T's user avatar
  • 13.5k
3 votes

Selenium un-enable to find element

It seems the second page is opening in a new tab, please switch the tab before interacting with the page: driver.findElement(By.xpath("/html/body/div[4]/div[2]/div[2]/div[2]/div[2]/div[2]/div[2]/div/...
PDHide's user avatar
  • 11.1k
2 votes
Accepted

Using SuperTest/Protractor on unsecure HTTPS

This is works for me (in python): from selenium import webdriver options = webdriver.ChromeOptions() options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"]) ...
Peter M. - stands for Monica's user avatar
2 votes

Automation halts when browser popup appears in chrome for robot framework

I have solved the problem by updating my chromedriver to 2.23. If anyone facing such issue then make sure you have updated version of browser and driver.
aakash sahani's user avatar
2 votes

Enable Flash player on Chrome 62 while running selenium test

A slightly tweaked solution to dimkin's has worked for me: ChromeOptions options = new ChromeOptions(); // Disable extensions and hide infobars options.addArguments("--disable-extensions"); options....
Bhurm's user avatar
  • 21
2 votes

How to save a copy of web page DOM using selenium webdriver and JAVA/C#

You can try to dump page source and parse it, or dump only element source. Page source to pageSource variable (Java): String pageSource = driver.getPageSource(); Element source to elementSource ...
mgasiorowski's user avatar
2 votes

Why do rspec-capybara chrome tests run headless fail on my mac and how to diagnose/fix it?

To debug, first try to take a screenshot in headless mode when you arrive at the button. Then take another screenshot before the test fails or after you click the button. It really looks like you ...
newsn31's user avatar
  • 609
2 votes
Accepted

Need help isolating a laptop camera related issue (camera does not start on Chrome, but would otherwise work fine, only happens to 1 tester)

My personal approach: Find an identical laptop with the same type of camera and try this again, see it happens. What I would look for: From this laptop's specification sheet, what type of camera is ...
Yu Zhang's user avatar
  • 9,952
2 votes
Accepted

Python stops after opening webdriver

WebDriver path should be passed as an additional parameter to chromedriver.exe as below: driver = webdriver.Chrome(executable_path=r"C:\TestFiles\chromedriver.exe") driver.get("https://www.google.com/...
Drop's user avatar
  • 171
2 votes

How to handle response varying from developer tool to code debugging in chrome?

What you show is actually a response body. Headers are represented in "Headers" tab in Dev Tools like this: Brief look up of what you provided shows that it's UTF-16 encoded string: For example: 1 -...
Alexey R.'s user avatar
  • 11.6k
2 votes

Programmatically determine chrome browser version regardless of OS

It turns out the reason chromedriver knows where chrome is installed is it looks for it in the default installation locations. See chromedriver requirements I ended up using writing this script. ...
Marcel Wilson's user avatar
2 votes
Accepted

How to disable selenium from taking physical mouse on Chrome on user's machine on a different monitor screen?

Selenium does not "take mouse from you" it can however switch focus to a browser window if certain conditions happens (usually when new tab opens). To avoid this i suggest you run your tests in ...
Moro's user avatar
  • 1,052
2 votes

Headless mode buttons are hidden - I think the side drawer is closed?

But there is no way to know for sure since it is headless Take screenshots
Rsf's user avatar
  • 7,089
2 votes
Accepted

How to use proxy with authentification in Selenium with Chrome WebDriver?

You need to set Proxy-Authorization header to the request which are coming from your web browser. I would use browsermob-proxy for handling this. Here you can find some example of how to use the proxy ...
Alexey R.'s user avatar
  • 11.6k
2 votes
Accepted

How to start Chrome in automation mode from command line?

Before you're doing new ChromeDriver() in your code, add these lines: System.setProperty("webdriver.chrome.logfile", "D:\\chromedriver.log"); System.setProperty("webdriver....
Alexey R.'s user avatar
  • 11.6k
2 votes

Selenium : webdriver.Chorme() function problems

The error you are getting is FileNotFoundError: [WinError 2] Impossibile trovare il file specificato My guess is, this is because of this line, web = webdriver.Chrome("C:\ Users\giova\Desktop\...
IAmMilinPatel's user avatar
1 vote

Force a browser's visibility setting to true

The browser being the topmost app on the OS is actually (what I would call) a meta state that is outside of Selenium's scope of dealing with apps and browser settings. So, if you really need the ...
FDM's user avatar
  • 5,904
1 vote

How can I place on-screen messages with Chrome running under Selenium control?

You can change the page title adding something like ((JavascriptExecutor)driver).executeScript("document.title = 'Test [" + testName + "]'"); This will not change page structure and won't introduce ...
Alexey R.'s user avatar
  • 11.6k
1 vote
Accepted

Google extension Check My Links returns different test results for the same webpage

Some webpages display elements based on viewport size of the browser. I have used CheckMyLinks XPI with chromedriver in a test Automation suite in the past and it provided consistent results. Please ...
BountyHunter's user avatar
1 vote

Automation halts when browser popup appears in chrome for robot framework

You can add the keyword Choose OK on Next Confirmation or Choose Cancel on Next Confirmation to have the test dismiss the dialog. You would call this keyword right before calling the keyword that ...
Bryan Oakley's user avatar
1 vote

Is there any difference in versions of Chrome across Android OS versions?

Certainly there are differences between version but of course it depends on what specific version you compare. As for seeing most traffic under 1 version, this may be a side-effect of most recent ...
Michael Durrant's user avatar
1 vote

Chromedriver 2.21 clicks on a button but the application is not responding as it should? Could it be application compatibility problem?

I can see that the button is clicked but the responses are not displayed on the UI. Consequently my test is failing when I use chrome browser to run my test. Selenium executes tests much faster in ...
Chris Kenst's user avatar
  • 3,731
1 vote
Accepted

Displays error while select radio button in selenium

As I understand from this stack trace it is issue of Element is not clickable. For this exception, following problem : Page is not loaded properly. So you need to wait for page and all ...
Sagar007's user avatar
  • 1,330

Only top scored, non community-wiki answers of a minimum length are eligible