Jenkins ver 1.647 generates and displays non-coloured Selenium HTML report - selenium

Test suite results in black and white as against the regular green for pass and red for fails

Thats easy to debug. Just run Chrome and view the report while you have the Chrome network traffic debugger enabled. When it fails to download a style sheet, you'll see an error and then you will know the reason why the page doesn't completely render correctly.

Related

Capturing Screenshot of Chromium-based Browser (e.g. Chrome) results in Black Screen

I'm trying to capture a screenshot of a minimized chromium window with https://www.codeproject.com/Articles/20651/Capturing-Minimized-Window-A-Kid-s-Trick. But all chromium based browsers end up as black and won't show. It works for all other windows like notepad and it works.
But when I try on a chromium based browser I get results like this.
I believe the issue is that it renders differently and i tried disabling gpu and direct x with arguments but it still didn't work.
cmd.exe /c start chrome.exe --no-sandbox --allow-no-sandbox-job --disable-3d-apis --disable-gpu --disable-d3d11 --user-data-dir=
Please do not respond with a method that brings the window to front then minimizes it again, thanks.

Unable to run my test suite in (Spanish, German or French)

I have a MacBook Pro(macOS Big Sur v 11.4). I am unable to run my test suite in different browser languages like (German, Spanish or French).
I use this command testcafe 'firefox --lang=es' and I have tried both firefox and chrome, I tried --lang=fr and --lang=ger but nothing works.
I tried with double quote testcafe "chrome --lang=fr-Fr" as well.
Everytime I run my test, it execute successfully with no error but always run in English browser language.
And one more thing above code works fine on windows machine.
It seems that on macOS, this method doesn't work out of the box whether or not you use TestCafe.
If you launch chrome with the --lang=fr-FR flag from the console directly (without TestCafe), it will not give the desired result.
Please see the following article and let us know if it helps: https://gist.github.com/kentbrew/e9449acd12c1ef2d78b5b473f615d23b.

"element click intercepted" only on TFS

I have about 130 Selenium UI tests for a web app we're currently developing.
The problem I have is, whenever I run the tests locally through Visual Studio's test explorer (vstest), I have never encountered this error before.
The problem is, some of the tests keep failing due to this message when the tests are run on TFS (using vstest on TFS too). element click intercepted
I'm also 100% sure there is no overlaying element that interferes with the click method as the tests never fail with that message when run locally.
Any idea what could this be?
I had issues where all of my local tests would pass, but I would receive random errors as you mentioned when running the tests through Jenkins or TFS, usually errors indicating that my elements were not clickable, etc. - the issue ended up being the browser size.
I started running my test in headless mode and specified a large browser size. Switching to --headless and setting a browser size ended up solving most of my issues for me:
var headlessOptions = new ChromeOptions();
headlessOptions.AddArgument("--headless");
headlessOptions.AddArguments("--disable-gpu");
headlessOptions.AddArguments("--window-size=1920,1200");
You will have to use --headless for this to work too. I tried to run my tests by ONLY setting window size, but the tests would still fail anyway because the resolution of the virtual machines was not large enough to handle the browser size I had set.
You can resolve this issue by using 2 methods.
1.Running chrome in headless mode
2.Scorlling to the element before clicking or interacting with it
The root cause of this issue is due to the fact that the browser does not load with a browser size as that of browser when tested locally
If you intend to run the test in non headless mode you can use the following code to achieve the result.
IWebElement element= driver.FindElement(By.Id(selector));
((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].scrollIntoView(true);", element);

Edge browser crashes after "No Such Window exception" with robotframework

I am using Edge web driver with robotframework (selenium2library) on windows 10 VM. When I run the test Edge browser is invoked test are getting executed too but somewhere in the middle (keywords: Wait until element is visible/wait until page contain element) I start getting the error "No Such Window Exception". There are no multiple windows but just a single window. Did someone face these kind of problem? This keyword is already being used for same page and it worked fore few tests but suddenly same page started to fail. It works fine on other browsers
Version Details:
Window 10: 10586.218
Edge Browser:25.10586.0.0
Edge WebDriver: Microsoft WebDriver Fall 2015 Update
The Edge WebDriver is not fully implemented. I appreciate you're essentially saying a keyword that works elsewhere is not working, however you're working with something that's in development:
https://developer.microsoft.com/en-us/microsoft-edge/platform/status/webdriver/details/
We made the call not to use this until it does become fully implemented; that might be something you should consider.

Intern 2.0 test stuck after running client.html page

I have a local selenium server (2.42.2) running with Chromedriver and Firefox. It seems to get stuck after loading and running client.html. I can see that my functional suite code runs in node, far enough to execute the main body. Anything in registerSuite never gets called.
Here are the selenium logs:
http://pastebin.com/KKg5ycvW
I can see the browsers in the selenium sessions page, but they don't appear to be doing anything.
Try opening up a new browser window and paste in the url that you see in the existing selenium ones. Then open up dev tools and see what console errors you are getting.
Intern's runner seems to get stuck in an infinite loop if any uncaught javascript errors are thrown during unit tests if the 'reporter' hasn't been setup yet.
This has been raised as an issue in intern's github repository.