I have just updated my firefox to v 20.0. Whenever I open Selenium IDE in firefox , it show a popup error .
Failed to load user-extensions.js file=[PATH to file ...]datadriven_v0.2/datadriven.js lineNumber=37 error=ReferenceError:XML is not defined.
The reported line in the file is sth like this :
XML.serialize = function(node) {
if (typeof XMLSerializer != "undefined")
return (new XMLSerializer()).serializeToString(node) ;
else if (node.xml) return node.xml;
else throw "XML.serialize is not supported or can't serialize " + node;
}
I do not know any thing specific to selenium IDE ,if XML is part of Selenium IDE or firefox . However, it seems latest updates to Firefox has sth to do.
I ll appreciate if someone help me fix this issue.
You can fix this by declaring the XML-Object in datadriven.js before it is called.
var XML = {};
XML.serialize = function(node) {
if (typeof XMLSerializer != "undefined")
return (new XMLSerializer()).serializeToString(node) ;
else if (node.xml) return node.xml;
else throw "XML.serialize is not supported or can't serialize " + node;
}
I don't know if this has any side effects, but for me it works.
Sven's idea worked perfectly for me. I added the command
var XML = {};
to the beginning of my user-extensions.js file, closed FF and Selenium, and restarted them. They've been working perfectly since then. I'm up to FF v21.0 with no problems.
Thanks Sven!
I am posting this for anyone using sel-blocks; the above solutions don't seem to work, since sel-blocks is an add-on and not a user-extension. However, there is still a solution. I added the line suggested above:
var XML = {};
to this file instead:
xmlextras.js
This file can be found in (selenium extension folder)/chrome/content/selenium-core/scripts
If you aren't sure how to get to your selenium extension folder, roughly here is how:
C:\Users(your username)\AppData\Roaming\Mozilla\Firefox\Profiles(your firefox profile)\extensions{a6fd85ed-e919-4a43-a5af-8da18bda539f}
I apologize if I'm not using the correct format for posting an answer or anything, but I just want to make sure that anyone searching for the answer I was looking for is able to find something.
From checking the Selenium website, the latest version of SIDE only supports up to Firefox version 17.
https://code.google.com/p/selenium/wiki/SeIDEReleaseNotes
Related
I am using Cordova 4.0.0 with AngularJS 1.2.26, Angular-Bootstrap 0.11.2, and UI Router 0.2.11 to create apps for Android and Windows (8.0 and 8.1). I am having an issue only when running the application in Windows with ui-bootstrap templates. The same error keeps popping up for standard templates for typeahead, datepicker, and the modal dialog, "Template for directive { whatever } must have exactly one root element."
Looking at the DOM inspector within Visual Studio, it seems that every node that has the ui-view directive is getting populated with its own set of head and body tags (which wraps around the template in question). I'm guessing that this is the issue, but am having trouble pinning down where these extra nodes are being inserted, and thus, having trouble proving out the theory.
The same code works as desired in the latest Chrome, FireFox, and IE desktop browsers, as well as within Android.
Does anyone have any insight on this behavior? It might also be worthwhile to note that ngCsp is being used to alleviate dyanmic content insertion restrictions on Metro applications.
Thanks in advance!
I found that the problem was in the shim winstore-jscompat.js
The method used to add the new tags has a bug.
My version of that method is:
cleansePropertySetter("innerHTML", function (propertyDescriptor, target, elements) {
empty(target);
for (var elementIndex = 0, elementsLength = elements.length; elementIndex < elementsLength; elementIndex++) {
if (elements[elementIndex].nodeName == 'BODY') {
for (var childIndex = 0, amountOfChildren = elements[elementIndex].childNodes.length; childIndex < amountOfChildren; childIndex++) {
target.appendChild(elements[elementIndex].childNodes[0]);
}
}
}
});
This did the trick for me. I have not yet tested all variations of directives.
The fix above didn't work for me, but I found a Fork that fixes the issue:
https://github.com/ClemMakesApps/winstore-jscompat/blob/master/winstore-jscompat.js
Note that this will probably be pulled into the main project at some point so this issue should go away "soon".
Also here is the original issue:
https://github.com/MSOpenTech/winstore-jscompat/issues/8
With Firefox addon SDK, how to open specific url automatically after Firefox startup (for the purpose of testing page)
I've tried tabs.open(url) in this doc:
var tabs = require("sdk/tabs");
tabs.open("http://www.example.com");
And this one and a lot of Stackoverflow page ..., but none of them works at all...(It is still just a blank tab after $ cfx run)
I think you want to do this:
const tabs = require('sdk/tabs');
exports.main = function (options, callbacks) {
if (options.loadReason === 'startup') {
tabs.open('https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Listening_for_load_and_unload');
}
};
The documentation for this is located here:
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Listening_for_load_and_unload
#canuckistani is actually right: if you're not seeing it, it's probably because your options.loadReason is something else. If you've got the plugin installed already, for example, you would get loadReason upgrade instead when you try to install the plugin again. See that url #canuckistani gave for more info.
The shoutcast stream not working using mediaelement js audio player on latest firefox 21. Its working on other browsers like Chrome and IE.
You check the link below. It was working earlier with older Firefox.
Test link
This problem can be be only solved by flash fallback for Firefox browsers.
You can find following line in JS code
t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid ) ;
change to
t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid )&& ( !t.isFirefox) ;
Please let me know if you find a solution to this issue. I'm encountering the exact same problem.
[edit] I found a solution. Add the parameter "mode: 'shim'" to where you setup your Mediaelement.js media player to force a fallback to flash/silverlight for the component.
For more detail, read the first comment here : what is mode:shim actually doing?
I'm working on a way to make it only do this for firefox, but forcing this fallback for all browsers won't break anything, so it's a good solution in the short term.
Like the title says, we are using ABCPdf6 to render PDFs from XSLT. Everything was working fine, but now we are getting an error that states "HTML render is blank". Using a browser (tested on IE/Firefox/Chrome) I am able to browse to the generated HTML (formatted XSL) and it displays perfectly fine in the browser. ABCPDF6 is not able to convert the file. I have tried giving control to the page that outputs the XSL, but I am still getting this error.
Does anyone have experience with ABCPdf and have encountered this before? The code was working fine before without a problem, and another page that uses the exact same generating code (even pointing to the same placeholder page that spits out the HTML!) is working fine.
I know what the problem was in my case now.
When i ran Windows update on my 2008 server, Internet Explorer 9 was installed.
IE 9 has a different way of rendering HTML which brakes abcPDF.
Updating to the latest version (8) solved all my problems. In this version you can also try another HTML engine called Gecko.
Even though you have resolved your problem, if anyone else gets this error, I would suggest that you install the trial version and try this out with the latest version.
I had same error on windows 7 machine with AbcPdf4.0. During MS updates IE8 was upgraded to IE10. Issue got fixed by uninstalling IE10.
Note: Abcpdf4.0 does not work with IE9 onwards. Either upgrade Abcpdf or uninstall latest IE.
I had a similar issue this morning with AbcPdf9. I added code to test the engine types and GECKO worked, then I swapped it back to MSHTML, and it still worked. So it was a temporary issue.
This is how you specify the engine type:
using (var document = new Doc())
{
document.HtmlOptions.Engine = EngineType.Gecko;
...
...
}
This code calls the method that converts the html to PDF, but calls it twice if necessary, since it will only fail once:
try
{
return GeneratePdfFromHtml(html, width, EngineType.MSHtml);
}
catch (Exception ex)
{
/* detect this known issue, swapping the rendering engine once seems to fix it */
if (ex.Message.ToUpper().Contains("BLANK"))
{
return GeneratePdfFromHtml(html, width, EngineType.Gecko);
}
throw;
}
Then you can add a parameter to the method that does the conversion:
public byte[] GeneratePdfFromHtml(string html, int width, EngineType engineType)
{
if (string.IsNullOrWhiteSpace(html)) throw new ArgumentNullException("html");
if (width < 100) throw new ArgumentOutOfRangeException("width");
try
{
using (var document = new Doc())
{
document.HtmlOptions.Engine = engineType;
...
...
If you have a suggestion or different solution, please leave a comment.
In regedit use the following steps
1)HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
2)Create a key DWORD 32 Bit
3) Rename it "w3wp.exe"
4) Set Value Date = 1
I have had problems using Firefox with Watin 2.0 and the recent 2.1 release.
FireFox: 3.6.17
Watin: 2.1.0.1196
Gallio / mbUnit: 3.2.601
Windows Server 2008 32 bit
.NET 4.0 assemblies
Visual Studio 2010
I went over these instructions repeatedly:
http://watin.org/documentation/setting-up-firefox/
I went to Firefox, File->Open, navigated to the file: jssh-3.6-WINNT.xpi
Installed the XPI in Firefox without any problem.
A few things do work fine in FF with Watin. Finding text fields, TypeText, Click, all that works. But this line of code blows up:
Assert.IsTrue(theBrowser.ContainsText(validationText), "Listing '{0}' was not found in the results.", validationText);
See below for the error. Any idea what I did wrong?
WatiN.Core.Native.Mozilla.FireFoxException: Error sending last message to jssh server: SyntaxError: missing ) after argument list
C:\QEDev\tools\WatiN\source\src\Core\Native\Mozilla\FireFoxClientPort.cs(422,0): at WatiN.Core.Native.Mozilla.FireFoxClientPort.CheckForError(String response)
Another user here on StackOverflow answered this question in a separate thread. Here is one workaround:
Sub-class based off of Watin's Firefox class
Override the ContainsText method
Use the HTML Agility Pack to load the document and call the Contains method.
This seemed to work fine for a while. On other computers I saw the same JSSH error as before.
public override bool ContainsText(string text)
{
WaitForComplete();
var htmldoc = new HtmlDocument();
htmldoc.LoadHtml(Html);
bool result = htmldoc.DocumentNode.InnerText.Contains(text);
return result;
}