Nightwatch is not fetching sendkeys values - selenium

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.

Related

Selenium chromedriver that does not depend on current Chrome installation

Due to organization policy, the Chrome browser installation on my Windows Server machine is automatically updated. I have some processes that rely on python Selenium and chromedriver. Because of this, my process breaks whenever my org decides to push out an update.
Is it possible to have chromedriver depend on some binary other than Chrome browser that will not be managed by my organization so that this doesn't happen?
Few of the workarounds to resolve the issue:
We have kept the chrome exe file in an artifactory and we download and install that particular chrome version every time before our execution through automation (our requirement is like that).
As #Corey is suggesting you can webdrivermanager, PFB link for more details
https://github.com/bonigarcia/webdrivermanager
You can try Dockerized Selenium, there you'll have the control in the docker-compose.yml file.

Selenium Chrome WebDriver is opening Setting as default tab asking to reset the setting

Selenium Chrome WebDriver is opening Setting as default tab asking to reset the setting.
I too faced this issue, fixed it by following below steps.
Run regedit command using window+r shortcut.
Registry Editor will opens then perform below mentioned.
There is a setting in the registry that's causing it.In the registry it's
under HKEY_CURRENT_USER\Software\Google\Chrome\TriggeredReset
Delete the TriggeredReset key and then close regedit.
Let me know if it works for you.
For macs, I solved this problem by updating chromedriver via brew upgrade chromedriver
This was an issue with latest Chrome on mac when driving UI with selenium. I installed previous version of chrome (59) on my mac, you can get here - http://google-chrome.en.uptodown.com/mac/old. I also turned off auto-updates by running the following in the command line:
defaults write com.google.Keystone.Agent checkInterval 0
To deal with this issue please delete TriggeredReset entry from Chrome registry as mentioned below:
Open a run box by pressing Windows key ⊞+R:
Type regedit and press OK, Registry Editor will open.
There is a setting in the registry that's causing it.
In the registry it's under: KEY_CURRENT_USER\Software\Google\Chrome\TriggeredReset
Delete the TriggeredReset folder (the whole folder which contains 3 files) and then close regedit.
Try running you test again.
The same thing happened with Chrome Version 62.0.3202.94, when the browser automatically updated. It was easily fixed when I updated chromedriver in my automation framework.
Just download new version of chromedriver from: https://sites.google.com/a/chromium.org/chromedriver/downloads
and put it to your Drivers folder in your framework.
I have version 62.0.3202.94 and I've tried updating my chrome driver using webdriver-manager update --versions.chrome 2.33 but when i run my protractor tests it still keeps opening tabs for chrome:settings/help during the tests even if I keep closing them.
For some users it's been observed that LEAPWORK opens two browser tabs in Chrome, one of them is the settings and the other tab is the Url specified in Start Web Browser. This issue won't let you proceed until you click CANCEL and Navigate to the Url again. Resetting browser is also not going to help you.
This issue belongs to Chrome browser registry, and it usually occurs when TriggeredReset entry resides in Chrome browser's registry.
Resolution
To deal with this issue please delete TriggeredReset entry from Chrome registry as mentioned below:
1.Open a run box by pressing the Windows key + R:
2.Type ‘regedit ’ and press OK, Registry Editor will open.
3.There is a setting in the registry that's causing it. In the registry it's under HKEY_CURRENT_USER\Software\Google\Chrome\TriggeredReset
4.Delete the TriggeredReset key and then close regedit.
Try running you test again.
Cheers:)
Try out the following steps:
Kill all the chromedriver instances running in your windows Task Manager.
Clean all the projects in Eclipse.
Restart your system once.
Provide the following options to start your Chrome browser:
ChromeOptions options = new ChromeOptions();
options.addArguments("test-type");
options.addArguments("start-maximized");
options.addArguments("--js-flags=--expose-gc");
options.addArguments("--enable-precise-memory-info");
options.addArguments("--disable-popup-blocking");
options.addArguments("--disable-default-apps");
options.addArguments("test-type=browser");
options.addArguments("disable-infobars");
driver = new ChromeDriver(options);
Your program should work with latest chrome driver 2.28 & Chrome Version 57.0.2987.110 (32/64-bit).
Let me know if this helps you.
try this. it worked when I had the same issue:
npm install selenium-standalone#latest -g
selenium-standalone install
selenium-standalone start
this is best solution
Resolution
To deal with this issue please delete TriggeredReset entry from Chrome registry as mentioned below:
1.Open a run box by pressing the Windows key + R:
2.Type ‘regedit ’ and press OK, Registry Editor will open.
3.There is a setting in the registry that's causing it. In the registry it's under HKEY_CURRENT_USER\Software\Google\Chrome\TriggeredReset
4.Delete the TriggeredReset key and then close regedit. Try running you test again.
Cheers:)

Selenium scripts fail after newest Windows update

I have a question regarding Selenium and the current Microsoft updates:
I just installed the newest Microsoft patches on a PC and now the Selenium scripts won't work anymore. I'm using the Selenium IE Driver 2.44.0 in the scripts. Maybe something has changed in the Internet Explorer, I'm not sure. Suddenly the scripts can't find any web elements on the page anymore. An InvalidSelectorException is thrown because the findElements methods can't be executed. The IE driver opens up and it navigates to the given URL, but when it tries to find a web element, the script fails. I also tried it out on a PC which hasn't the newest updates installed yet and the scripts are working fine there, there are no problems at all.
Do you have any ideas what to do or what could be the cause?
Thanks a lot!
Yes as I stated here
If you have taken windows update KB3025390 IE will not work as expected. There is currently no resolution to that yet.
Also, Uninstalling the update KB3025390 should make the WebDriver work correctly with Internet Explorer 11. See this answer

Is there a way to permanently modify the user string agent (Chromium browser)?

I like to use the most up to date version of Chromium, Google's open-source version of Chrome. The problem I have about Chromium is that the userstring can always uniquely identify my system based on the version number (as not too many people keep up to date with the Chromium snapshots).
My question: is there a way to modify Chromium to always send out a DEFAULT user string agent (i.e. Chrome version 29 or Firefox 24, not Chrome 32)? Thanks for any help!
I think there is a command line option for that, e.g.
chromium-browser --user-agent="Chrome version 29"
For more details see this page: Chromium tips and tweaks.
(Note: I'm not sure if it will work in future versions)

Jenkins with Xvfb and Selenium - Firefox started but nothing executed

I have a problem with Selenium under Jenkins 1.446 together with Xvfb: It looks like firefox is started correctly because I let my failing tests record screenshots. These screenshots all show the same failing page, which in my case is the starting page where the tests should begin. So I gues the selenium WebDriver commands do not arrive. What could be the reason? By the way, the tests are running perfectly on my local machine.
I'm using Firefox 9.0.1 with no specific test profile and no AddOns, Ubuntu 10.04, Senlenium 2.16.1
Log entry: com.thoughtworks.selenium.SeleniumException: Timed out waiting for action to finish
Thanks!
EDIT: Issue seems to be fixed by a system reboot ...
I experienced a very similar issue with FF9.0.1 and Selenium 2.16.1 running through JUnit launched by Maven SureFire plugin run by Jenkins on a WinXP node.
2.17.0 fixed the issue for me. Try updating to the latest Selenium.
Through RDP, I was able to watch the tests running. The tests appeared to be partially blocked by a prompt from Firefox asking about collecting anonymous usage statistics. Manually answering the prompt would allow the test to continue but because Selenium creates a new profile each time by default, the prompt would return on the next browser launch. Running the tests locally with a pre-configured FF profile allowed me to persist that the prompt had been answered. This isn't possible on my XP node because the tests are running as 'System'.
Selenium/WebDriver would normally take care of this for you by marking the prompt as already answered in a temporary FF profile configuration but a bug was causing the value to be set to the wrong value. You can inject a profile configuration to the Selenium FirefoxDriver driver to pragmatically configure stuff like this prompt but the bug appeared to prevent this as well. This has been resolved in Selenium 2.17.0 (http://selenium.googlecode.com/svn/trunk/java/CHANGELOG see 2.17.0 WebDriver bug fixes).