"Error" sign in terminal when a run a test - testing

Why does this sign Error: No tests to run. Either the test files contain no tests or the filter function is too restrictive. always come out, if I already do these tests in the TestCafe Studio and did not give an error?
Also, I follow the Pluralsight course, wrote the same code an make the same steps, but still doesn't work.
The TestCafe window pops out but closes automatically after finishing the loading.
Why should I do, or try?

All fixed, was a version misunderstanding... with TestCafe 0.3.0 work immediately. Run
npm install testcafe-blink-diff#0.3.0 to install that version.
Also, I wasn't paying attention, cause the code I need it was on JavaScript, and I was writing down in TypeScript.
For some reason, my google chrome version was a problem too, so I change
Browser: Chrome 75.0.3770 / Windows 10.0.0 to Chrome 76.0.3809 / Windows 10.0.0

Related

How does the elixir community recommend setting up integration tests with chromedriver?

I am using Hound (https://github.com/HashNuke/hound) for integration testing a Phoenix application. I have chrome and chrome headless working. To get it working I have another terminal window running chromedriver (installed via brew). This feels odd to me. Is there a library or test setup that would feel more "integrated" into the application? What's the Elixir way of doing this?
In the Ruby world there's the webdrivers gem (https://github.com/titusfortner/webdrivers). As far as I know it downloads a specified driver (lets say chromedriver) to $HOME. Then with every test run, the test uses the driver downloaded to that destination to execute the tests.
Before the webdrivers gem there was chromedriver-helper gem. Before that it was phantomjs. These implementations made it so running integration tests required 1: downloading the driver 2: running the test
In Elixir (with Hound) I have my tests working by first running chromedriver --verbose in a terminal split, and in the other screen I run mix test. This works fine but feels disjointed. This adds extra steps, 1: download the driver 2: start the driver 3: run the test 4: stop driver
I could write a script manually to run chromedriver in the background, and stop it after the tests are run.
I am new to the Elixir community and so I've researched a lot. It's still not clear to me if there is a "traveled path" I should go down vs just hooking everything up manually.
Have I missed a recommended abstraction? Is this intentional? Is this "just not created, yet"?
Thank you
Have you checked out wallaby? See https://github.com/keathley/wallaby

Nightwatch is not fetching sendkeys values

I am working on selenium using nightwatch. Previously it was taking input for login and password but now it has stopped entering values for login and password.Is there any change in nightwatch?
The classes for login and password is still the same.
If this problem is happening for Chrome, you may have upgraded you browser, but not your driver. go to http://chromedriver.chromium.org/ and get the correct version of chromedriver and put it in ../lib and ../node_modules folders to replace whatever version of chrome driver you have there.
Another possible suspect - if it's happening for all browsers - is your Selenium standalone server. Go here http://selenium-release.storage.googleapis.com/index.html and get the latest (today it's 3.12) install that in the appropriate place in your configuration and remember to update all references to it. When you install a new version of selenium standalone it is often necessary to restart your computer to get it to be recognized, too.
Even I was facing the same issue a month ago.. All you need to do is just update your chromedriver to latest.

Selenium WDS executeScript()

I have a strange problem, which I'm unable to solve for sometime. I have a selenium WDS for Firefox browser. I tried to execute the code in JMeter UI, everything works fine. But when I try to execute the same in a server (using XVFB driver), I get the error:
rm="sun.org.mozilla.javascript.EvaluatorException: Can&apos;t find method org.openqa.selenium.remote.RemoteWebDriver.executeScript(string,org.openqa.selenium.remote.RemoteWebElement). (<Unknown source>#17) in <Unknown source> at line number 17"
All the required drivers are the same as the one I locally try. Yet, I get the error only when I run in the server but not locally. Please help
Most probably you have different versions of either WebDriver Sampler or dependency libraries, I don't see any other ways for the same script to work on one machine and don't work on another.
Install the same version of JMeter onto both machines (use JMeter 3.2 or later, whatever is available at JMeter Downloads Page)
Install latest version of the WebDriver Sampler plugin using JMeter Plugins Manager
Your test should now be running fine.

Setting up selenium, chromedriver, and wdio mixed with vagrant or docker

I started out trying to learn how to write automated tests for a small project but nothing was working right out of the box. After a couple hours of searching & experimenting I found the right configuration for my project & figured sharing it might help folks in the future.
Here's a small summary of the errors I encountered on this debugging journey:
Using Jasmine & WDIO, send_keys was crashing
It was a Firefox/geckodriver bug, or something like that
WDIO appeared to hang after switching from Firefox to Chrome
Chrome needed to be run in --no-sandbox mode, essentially
I figured my problem was probably stemming from having WDIO execute my tests on my local machine while Selenium was hammering on the browser in a Vagrant VM. So this will mainly be applicable for people using separate environments (vagrant->local, vagrant->vagrant, docker->local, etc) for WDIO & Selenium/Chromedriver. Here is a gist of the configuration file I ended up with.
I started with fanatique/vagrant-selenium-vm and modified it to use Chrome instead of Firefox because send_keys was broken with Firefox/geckodriver at the time of writing. After swapping out the packages, I'd start the tests with wdio but it would appear to hang. Turning on verbose logging showed it trying to start but failing with no explanation why.
[00:06:39] COMMAND POST "/wd/hub/session"
[00:06:39] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"chrome","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriverio"}}}
It took removing the & from the nohup java ... command in fanatique/vagrant-selenium-vm's setup.sh to see the logs from Selenium in real time, then I was able to see a "only local connections are allowed" message from chromedriver. That led me to a SO post that said to add --whitelisted-ips="" as an arg to chromedriver - but I was still getting the local connections error message. Chrome itself ended up needing a --no-sandbox flag - that allowed WDIO to connect to the chromedriver in Selenium and my tests ran from there.

Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my build server which is a linux box , i get this error
Caution: '/usr/bin/firefox': file is a script file, not a real executable. The browser environment is no longer fully under RC control
basically the selenium-rc is not able to find the firefox executable on linux(actually its a .sh file here), which is present in the case of Windows .
Has anyone faced this error before. Please let me know for any pointers.
Thanks for any help
~Pratik
Thanks!
Pratik
This is occurring because Selenium wants to start the FireFox binary directly, rather than delegate to the normal launch script. Before checking for "firefox" (which is a script on many installations), it checks for "firefox-bin". You can circumvent this problem by creating a link named "firefox-bin" that points directly at your desired version of the firefox binary.
This is described under "Ubuntu fix" (though it actually applies to other Linux'es as well) in the Cucumber Wiki at:
https://github.com/cucumber/cucumber/wiki/Setting-up-Selenium/612fae3f39528be39594d145ec12a4747855e030
Hey, I have Selenium running on Karmic with no issues. I can't quite remember how I did it, but I think it was a case of grabbing a more recent version ot the selenium-rc-serve.jar.
I also remember looking at this post: http://tero.tilus.net/rutinat/2009/08/18/cucumber-running-selenium-on-debian-lenny/
Hope something there points you in the right direction!