Sometimes clicks do not work in Firefox or Chrome when I am using nightwatch. I have the following code
browser
.waitForElementVisible('.example')
.click('.example')
.waitForElementVisible('body')
The problem is the click event doesn't fire. Does anyone know why clicks sometimes do not work when using nightwatch.js and what you should do to accomodate this?
I guess, you should specify the time period in the function waitForElementVisible('body', 1000). Update the code with this and see you are able to resolve the issue
For syntax and example for waitElementVisible() see here
I was looking for an answer to this as well and the only solution seems to be to use an older version of Firefox and a compatible driver.
Here is the message that Selenium offers when you attempt to create a new issue on their github issue tracker:
"Since Firefox version 48, Mozilla requires all add-ons to be signed.
Until recently, Firefox support in Selenium was exclusively provided
by an add-on. As this add-on is not currently signed, this solution
does not work with the latest Firefox releases. As an alternative,
Mozilla are working on a WebDriver specification compliant
implementation named GeckoDriver. Please note that the specification
is not complete, and that Selenium itself does not comply with the
specification at this time. This means that features previously
available through Selenium will not be available using GeckoDriver."
.waitForElementVisible('.example')
waitForElemenVisible accepts a minimum of 3 arguments. Please see the following snippet for an example of the correct usage
.waitForElementVisible('.example',5000,false)
Related
I want to build a Firefox extension that will need to change the configurations (about:config). It is not obvious whether I can change the configurations (about:config) in webextension?
If not, is there any way to do this in the old development environment?
This is covered in the webextensions FAQ (the answer is no):
https://wiki.mozilla.org/WebExtensions/FAQ#Will_I_have_access_to_about:config_or_the_preferences.3F
I'm not sure about your second question, if you're asking about the add-on SDK, it has a module for accessing preferences but extensions written with the SDK will stop working in Firefox 57:
https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/preferences_service
I've programmed an addon for Firefox. In the "backend view" of the Firefox addon store I now see the message, that my addon is no longer compatible to Firefox starting from version 30.0 (see screenshot1).
A quick look into the new API told me what to change and so I did.
But how can I make shure, that useres with a Firefox 29.0 or older will still get the "old" version of the addon, and users surfing on Firefox 30.0 and newer get my updated addon?
Does the shop backend makes that choice? Because when uploading new addons I can set the supported versions of Firefox (see screenshot2).
And how to increase the addons id? Now it is set to 1.0.0. Should I go with 1.0.1 or should I leave some "space" for updates to the "old" version and start with 2.0.0?
I'm confused. Could anybody please help me? Thanks in advance!
Bye
Niels
Sometimes these incompatibility notices are false alarms (this seems especially the case with version 30) and sometimes the resolve spontaneously because Mozilla runs batch tests or the like. If the compatibility issue is with (say) widgets vs. ActionButtons, there are ways to accommodate both levels of FF version support with try...catch structures.
This is what an AMO developer answered via mail:
AMO should offer the right version depending on the browser version
you're using. In the worst case, users can click on the All Versions
link and see past versions that can be installed.
So I uploaded my updated extension and set the browser-compatibility to Firefox 30.0 and higher.
You can include separate code for different FF versions if you want Chrome registration - appversion
Here is an example from GreaseMonkey chrome.manifest:
overlay chrome://browser/content/scratchpad.xul chrome://greasemonkey/content/scratchpad-overlay.xul appversion<23.0
overlay chrome://browser/content/devtools/scratchpad.xul chrome://greasemonkey/content/scratchpad-overlay.xul appversion>=23.0
I recently started using the Dojo firebug extension. I had gotten used to it since it had some nice features (letting you see dojo on the widget level). This was good for me because I am in the process of trying to learn dojo so this really let me see how stuff worked together.
My question is, has anyone found any solutions to get the Dojo firebug extension working in Firefox 6 or should I just try downgrading to FF5?
Thanks
UPDATE:
I tried a workaround I found somewhere else. It said to use the Firefox nightly build add-on, and that add-on would allow me to override the version compatibility. I tried that and it still didn't work.
I recommend trying the Add-on Compatibility Reporter extension from Mozilla. This extension (besides letting you report incompatible add-ons) lets you completely disable version checking.
It's a great way to ensure that older extensions still work when Firefox upgrades the browser every week. Now, this assumes that the issue is with version compatibility, and not that the plugin is actually broken! If it's the latter, there's not much else you can do.
(Also, that's an awesome plugin. I'm definitely going to try it out myself here shortly!)
I've recently started using watir-webdriver and so far am a big fan. However I need to be able to test Safari too, and I don't have access to a mac to be able to use Safari-Watir.
Does anyone know a good alternative to use for testing Safari on a windows machine? (In Ruby of course)
Thanks
(important, see UPDATE below)
the Selenium Webdriver folks are apparently waiting for something from Apple in order to support safari. I would not hold your breath.
Apple does have a version of Safari for the PC, I'm not sure how good the current version is, the initial releases were.. um, well, lets just say they had issues (lots of issues)
Personally (mostly for security reasons) I would not run it nor recommend anyone use it for any purpose other than downloading Chrome or Firefox. But unfortunately a lot of apple users use it because it's what came with their systems, which means to the extent apple users are part of your target market, you have to test on it.
For the moment that means you'll need to use Safariwatir, which has not as far as I can tell had an update for a year or more.
the current state of support on both the Selenium/Webdriver side and the Safariwatir side was discussed recently in this thread in the watir general group on google
UPDATE
Webdriver now has Safari support, which makes direct support of safari (I think on a mac only at this point) possible. See http://watirmelon.com/2012/04/17/using-watir-webdriver-with-safari-at-last/ for more info.. still a bit DYI but I'm sure it will get more accessable soon.
Mike, seems this is available now. Alister Scott wrote up some instructions on his blog Using Watir-Webdriver with Safari At Last
Unfortunately this still a bit DYI because you have to build your own safari extension, which requires getting certificates and such from apple, and I'm not sure if you can create the right environment to build that stuff on anything other than a mac.
I am looking for a way to automate couple of browsers... Firefox and Chrome (for now on just Windows) from an external application/process.
Is there a way to do things along these lines:
Start the browser with a URL
Have the browser load up the page, run script etc.
Inspect the DOM
For reference, IE can be automated using the InternetExplorer.Application object which can be created in a shell script using the following javascript, and then I can walk the DOM API:
var ie = new ActiveXObject('InternetExplorer.Application');
The motivating scenario here is automated testing. I'd like to load up the page containing the test code, and gather results after the test has run.
http://watin.sourceforge.net/
WatiN does exactly that, and I believe they recently added Chrome support
Update 6/22/2011:
Currrently WatiN only works on Firefox 2 and 3, not in Firefiox 4 (and almost certainly not in Firefox 5, which was released today). Also, the time of this answer, Chrome support was supposedly being added, but it looks like that never got fully baked and now is not listed as a suported platform on their home page.
Also worth noting, in my experience WatiN got a lot slower when I upgraded to IE9. I saw this on two different machines, and downgrading to IE8 sped the tests back up on both machines.
I still use WatiN heavily, but now mostly for behavior driven design and functional regression testing, which generally are not browser-specific. Then, manually test in FF and Chrome for all progression testing.
Update 9/22/2015:
Elmue is right, it looks like WatiN is no longer being worked on. We've looking into Selenium for our automated acceptance tests now: http://www.seleniumhq.org
TestR will let you automated IE, FF, and Chrome. I've started working on Edge support but just haven't had the time.
https://github.com/BobbyCannon/TestR
You can use the nuget package.
https://www.nuget.org/packages/TestR/
Here is some examples.
https://docs.epiccoders.com/Page/35/TestR