How to get rid google chrome helper message pop up - java

In macOS, when you set the chromedriver to headless, google chrome helper will pop up an annoying
window
If you close the window, the program will break, if you choose always allow, it will also break, the only way is to let it sit and do nothing while the program is working behind it until it finishes and you're allowed to close this window.
This is so annoying, I want to publish my program and I don't want my mac users to get disturbed by this.
Use another headless browser instead
nope. No can't do, HTMLUnitDriver javascript engine is useless. PhantomJS and JBrowser? Obsolete, no Java 11 support.
The window only shows when the chromedriver is headless and on the macOS.

Related

Error: When i minimize Internet Explorer which is running the automated WebDriver Code

I have written the Selenium webdriver java code to automate the test and its working fine. But I have lot of data input to test my web and it takes time. So when i minimize the IE to do some other task while it is running the automation, it is throwing error:
org.openqa.selenium.ElementNotVisibleException: Element is not displayed
Selenium WebDriver is trying to simulate "real" users interaction with the webpage. If a person can't click on a button not currently displayed, neither can Selenium.
ElementNotVisibleException occurs when the element you want to interact with is not displayed. When you minimize the browser some of the elements are no longer visible, even though they where in maximized window.
You can add scroll using moveToElement() from Actions class every time you want to perform any action (I don't recommend it, you increase significantly the chance for errors), or find another hardware solution, like plugging in another screen, run the test on another computer etc.
According to my experience, the Internet Explorer WebDriver is very oversensitive when it comes to disturbances from a real user while running test cases. It's better to not touch anything at all. ;-)
Try Chrome! This is much more robust and also faster.
Selenium script runs as a simulator. You cannot do another work when script is running. Chrome is fast but while running script in chrome you can not do other task like any other browser. If you minimize window, you will get exception "ElementNotVisible".

Java applet won't receive mouse focus on OSX

I develop RiboVision, http://apollo.chemistry.gatech.edu/RiboVision/
Some within the last few months, my site developed a problem on macs. I use the Jmol Java applet. It is not receiving mouse focus anymore, but only on Macs, and in all browsers, Safari, Chrome, and Firefox. It has to be related to some update Apple did to Java.
A really odd thing is that FirstGlance, does work on a Mac. It's basically the same Java Applet embedded in their page. http://bioinformatics.org/firstglance/fgij/fg.htm?mol=1d66&JAVA
I have no idea what I'm doing differently.
EDIT.
On a PC using Chrome, the applet works initially, but does not work after switching tabs. On a PC using firefox, it works correctly. On the mac, again, on all browsers, it doesn't work even the first time.
I don't know how to debug something so complex and elusive. No errors show in the console.
I solved this. Turns out, it was an issue with the z-index. I had the z-index of the Java applet set to -9000. This had no negative consequences before. I don't know when Apple changed something, but now it listens to the Z-index. I set the Z-index to something more appropriate and it's back to normal.

Instability When Multi-tasking on Machine for webdriver script

I am facing the following issue please Help me:
When using my computer at the same time the tests are running in
the background - it is very easy to make a test fail that would
otherwise have passed. The easiest way to duplicate this is during
sendKeys - when text is appearing in a text box - if I click on the
browser title bar and hold and/or drag the window or try to work on eclipse at the same time - it is easy to
break a test.
I am using IE 7, Windows XP SP3.
Regards,
Gorav

Restrict browser exiting Selenium

I have a little app that uses selenium and works with two Chrome browsers simultaneously.
I was wondering if there is a way to restrict permission to close the browsers.
I mean I want a user to be able to ONLY close the program by using the GUI window but not turning off the browser.

How to get browser window front while running the test using selenium webdriver?

I'm currently running my selenium webdriver tests in 2 browsers (studentdriver and tutordriver)
studentdriver = new ChromeDriver();# opening student in chrome browser
tutordriver = new FrefoxDriver();#opening tutor with firefox browser
and I'm student browser first and then tutorbrowser soth that student browser will be behind and tutorbrowser will be on front side. when script running with studentbrowser, it will automatically comes fron and tutorbrowser will be back side but when script start running using tutorbrowser it is not coming front side and it is creating some problem in between.
I need a solution to get tutorbrowser front when script start running on tutorbrowser.
Note: I should not close studentbrowser because I'm closing both the browsers in #After
((JavascriptExecutor) driver).executeScript("window.focus();");
try this with each driver.
Unfortunatly, this is an OS problem. It's up to the window manager to handle the ovelapping, tiling, organisation of the windows, which you can't control directly from your code.
The best bet you'll have is to launch a Sikuli Robot with which you'll be able to bring back the correct window. It's a bit of work, though, to include in your tests, but it can be used from Java with no problem
See the beast at http://www.sikuli.org

Categories

Resources