I've got a little test suite working on my laptop which I've tried to transfer over to my work desktop. To, hopefully, make things easier, I used the same version of Java and maven. However, typically, it's not been so easy :)
When I started Firefox, I got a "Firefox has stopped working" message box. The message box indicated the issue lay with "xul.dll" - so I closed the box and Firefox opened. It does this everytime I open Firefox.
I have even stripped out all my allure and other code and just ran a simple case:
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.co.uk");
However this doesn't work either.
It was then I checked the versions of Firefox were the same, turns out they weren't - but the Firefox updated fixed that. But my test still passes on the laptop, but fails on the desktop. I can't see anything I have missed, I can see one possible issue - the work desktop has Kaspersky installed.
Has anyone ever experienced what I've described?
I have also observed that antivirus causes the Firefox to hang during the launch. Try disabling the antivirus and rerun your script to verify that in your case also the antivirus/firewall is causing the issue.
Check the version of Firefox on both computers. I have two Windows machines with Selenium 2.45.0. One machine has Firefox 37.0.2 and the code below executes fine. The other machine I just updated to Firefox 38.0.1 and I receive that error message box.
#Test
public void testFirefoxDriver() throws Throwable
{
new FirefoxDriver();
}
I've been using Selenium for over a year now. Our production server automatically updates Firefox and this occasionally causes incompatibilities between Firefox and Selenium. I would expect to see a new Selenium release very soon.
Firefox 38.x is not supported by Selenium 2.45.1. Either you have to roll back your firefox to 37.x or wait until next revision of Selenium.
https://github.com/SeleniumHQ/selenium/issues/437
I've got this same issue. Funnily enough it was working yesterday morning I started getting it yesterday afternoon and now it appears to be messing up my tests.
I have Selenium 2.45.0 & Firefox 38.0.1.
My tests were running perfectly before this started happening and nothing has changed in my code. I've also ran another test suite just to make sure that it wasn't the one I was working on. The same thing happened.
I've just uninstalled firefox downloaded the previous version and they now work again with no crash.
Related
I have a selenium java project but I have an unsual error after some weeks not working on the project.
After searching on internet, most people said it was related to the chrome driver version. This seems weid, because I use the "io.github.bonigarcia.wdm.WebDriverManager" package to handle chrome version (and as you can see, I used the 103 chrome driver version).
After downloading the next version, and use:
"System.setProperty("webdriver.chrome.driver", "C:\Users\path\webdriver\chromedriver-104.exe");" the browser even fail to open, and it print me this error message.
But it seems the version is still 103 for my "personnal" chrome browser. I tried to update it, but it remains 103..
I tried to download the 104, but it act "beta chrome"...
What am I supposed to? Is there anyone else having issue with chrome selenium lately? Is there a work around? Can someone explain why selenium even bother to know the version of my work chrome?
The bug is actually in version 103 of the Chrome browser, not chromedriver. See https://bugs.chromium.org/p/chromedriver/issues/detail?id=4121 .
I have been able to mostly work around this by adding Thread.Sleep()'s (in C#) ranging from a fraction of a second to a few seconds, before the Selenium calls which fail.
INTRO:
I am a student using Java Selenium for GUI testing. I cannot get test cases to run on my desktop but other members of my team are able to.
WHAT TECH/SOFTWARE IS BEING USED
We are using JDK 14, IntelliJ Community Edition, BitBucket for our repo, and JUnit 4.
WHAT AM I TESTING
I am testing a sample single page application. I add a task, use a date picker to add a date, and then I click the "Add Item" button. However the click to the button isn't registered and the task isn't added to the list. If I restart my computer the first #Test works but the second one fails to clear the cookies and the second #Test fails.
DETAILED VERSION:
I am coming from a Surface Book 2 to a Alienware R10 desktop. My team was able to pull the project and run all of the test cases with no problem. However, I was unable to. The same program works on my SB2 but not on the Alienware R10 (AMD 3900 Processor).
WHAT I HAVE TRIED:
I used both a locally stored Chrome Driver and I used Boni Garcia's
WebDriverManager.
The project is built using Maven so I have tried to use both
dependencies and also add the selenium files directly to my project
structure with no success.
I reformatted my new R10 and tried to install everything again. I
carefully added the JAVA_HOME and MAVEN_HOME to my system path.
I tried to use ChromeOptions after seeing some posts on SOF and none
of those worked either.
The QA dev who leads us tried to help me for about 40 minutes and
couldn't figure it out. He said the problem isn't with my IDE but it
is with the Chrome cookies. I will have to clear the cookies every
time I want to run a JUnit Selenium test. However, other members of
my team do not have to do this and this doesn't always work.
EXTRA DETAILS:
I got a new Alienware R10 with the AMD Ryzen 3900 chip. I have added
JAVA_HOME and MAVEN_HOME to my Path and environmental variables.
I may be adding to the project structure or dependencies incorrectly.
This is my first post so please let me know if I should format the
question better or if I left any important details out.
CONCLUSION
I am pretty worried I wanted to study and practice over the weekend but I have put a lot of time into fixing this. My next idea is to use Eclipse instead of IntelliJ and see if I can get it running there. Any advice here would be helpful.
EDIT
Eclipse is not working either and has the same problem. This tells me the problem is definitely not related to the IDE. It is likely a CPU or Browser related issue. I also tried using other drivers through the WebDriverManger dependency.
Upon further research it seems to register clicks and actually add to the Tasks if I add a few Thread.sleep() functions into my code instead of the ExpectedConditions and element visability. The problem may be stemming from using the ExpectedConditions API but again this is working for my teammates and not for me. Could this potentially be a AMD chipset issue?
The element visibility may be the wrong function to use here but it did work on my teammates machines so that is why I didn't try to look for an alternative there. The function we are using looks at the DOM tree and we may instead want to see the visibility on the browser instead. I had difficulty testing this out as I didn't have a laptop to work with.
I reformatted my old laptop so it could be sold since I had this new PC set up but I will use it to try another function to see if it brings a different result.
EDIT2:
Observation/Guess
I am going to guess the problem is with the AMD 3900 CPU. The Thread.sleep() changes the behaviour to at least click my 'Add Item' button. It still does fail the tests I put it through and the ExpectedConditions API still doesn't work.
I am going to be returning the Alienware R10 and going to get an intel CPU R10 or build my own PC.
This is just an educated guess based on the difference in the behavior seen between my and myteammates' machines they have intel I have AMD.
If you are facing a similar issue please confirm whether you are using AMD or Intel in this thread. It will help others as well. I'm sure there are work arounds but they did not work for me. I also tried using ChromeOptions to disable the GPU and a few other options.
However there was no success and unless there is a better answer I'm blaming the AMD 3900 CPU.
Thanks and please contribute to this thread if you are facing a similar issue or have found a better answer. Any speculation could be helpful too.
I agree with the QA on your team.
This is not IDE related. I would suspect that manipulating the DesiredCapabilities of the WebDriver would resolve this issue. Given that you are using the bonigarcia WebDriverManager dependency, I would recommend atleat attempting the code below to see if the WebDriver can be created properly.
public static void main(String[] args) {
WebDriverManager.chromedriver().setup();
DesiredCapabilities chromeDesiredCapabilities = DesiredCapabilities.chrome();
WebDriver webdriver = new ChromeDriver(chromeDesiredCapabilities)
}
Getting following error in selenium tests
POST /session/ee1b9201-dadc-7446-b753-0a418a230d30/moveto did not match a known command
What i've done is
Actions resetView = new Actions(driver);
resetView.moveToElement(el).perform();
Environment:
Firefox v47.0
Webdriver 3.0.0-beta2
This is entirely expected. No releases of GeckoDriver (Marionette) support the Actions class. It is one of the top priorities of Mozilla's team developing Marionette.
There is an issue that Selenium tracks, that is blocked by the Marionette issue.
Since the issue it's over 3 weeks old, and looking at their commit log, I wouldn't hold my breath for a patch anytime soon.
If you can use Firefox 47.0.1, because in Firefox 47.0 they had another bug, you can use the old WebDriver API that works (not Marionette). From 48 it stopped working, because you're supposed to use Marionette. Yes, that Marionette that is not finished.
If you must test on Firefox, I recommend you should stick to Firefox 47.0.1, Selenium 2.latest, eventually throw them in a docker image, and run like that.
That's what I do at least for Germanium, until it will hopefully eventually work also for Marionette.
I am using Firefox Developer Edition 49.0a2 and I am able to open the web browser but after driver.get("example.website.com") executes, it just loads the page and hangs there. The test does not fail or error out.
I've tried using Marionette Driver and it doesn't even interact with the browser. I have also tried the different variations of the constructor such as FirefoxDriver(FFbinary, FFprofile, FFcapabilities) and the others that only require one or two of the parameters in all possible permutations. The developer edition of Firefox is where I get the best results as Firefox 47.0 is explicitly not supported.
i face the same issue so i tried to update the Windows OS and checked again
it worked fine for me.
Gecko driver might not be compatible if we do not update OS as well
Check it once if it help
as per the title, I am using Selenium 2.45.0 WebDriver and trying to run some tests in IE11 with Win7 Pro. I have used these in Firefox and all works well.
The issue I am having is that shortly after the IE window is opened, Selenium looses track if it. I have searched and found the registry key and tried the security settings.
Here's where it gets odd. If I run this in Debug, it works. No issues. Just works. I also, for a time, thought the firewall was blocking stuff as things passed the first time it ran ( an allow access window appeared) however after allowing access the tests fail.
Anyone have any extra ideas?
I managed to get this working. Initially, I had saw Issue 6511 on the selenium group and had set my registry key for the 32 bit version of IE - however according to the issue, I should have set my registry key based on the version of windows. So
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE - added a DWORD called "iexplore.exe" and set it be 0.