1

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.

1 Answers1

0

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)
}