javascript FF 30.0 中的 NS_ERROR_XPC_SECURITY_MANAGER_VETO 错误使用 Selenium IDE 2.5.0 填充页面

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24500815/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-28 02:56:03  来源:igfitidea点击:

NS_ERROR_XPC_SECURITY_MANAGER_VETO Error In FF 30.0 Using Selenium IDE 2.5.0 To Populate Page

javascriptjqueryseleniumselenium-ide

提问by cdaringe

When running a selenium IDE script to autofill a form, I receive the following:

运行 selenium IDE 脚本以自动填写表单时,我收到以下信息:

[error] There was an unexpected Alert! [Javascript Error :MY-SUPER-TOP-SECRET-URL line 37 Error: NS_ERROR_XPC_SECURITY_MANAGER_VETO: ]

When I checked line 37, it is a tiny block of code setting a global bool, wrapped in a jQuery click() anon function.

当我检查第 37 行时,它是一个设置全局 bool 的小代码块,包含在一个 jQuery click() anon 函数中。

  parent.jQuery(parent.document).click(function () {
     parent.sharedVars.enableGenderKey = false;
  });

I am running jQuery 1.8.3. Any tips? Interestingly, the form DOES fill successfully once, but on attempt 2 and above, it errors.

我正在运行 jQuery 1.8.3。有小费吗?有趣的是,表单确实填写了一次成功,但在尝试 2 及以上时,它出错了。

回答by cdaringe

We traced it down, we believe to bad SSL certs. We couldn't confirm it absolutely, but once the certs got settled, the issue seemed to vanish

我们对其进行了追踪,我们认为是错误的 SSL 证书。我们无法绝对确认,但是一旦证书得到解决,问题似乎就消失了

回答by gonesoft

I know this is an old post, but I got this error today (jQuery 2.2.3 and Firefox 46.0.1). I had (A) a form post that caused (B) an iframe to load with jQuery code that (C) created elements in the parent of the iframe. Some of these had an anonymous function to handle click events. When clicked, this function caused (D) a form submit, again to the iframe.

我知道这是一篇旧帖子,但我今天遇到了这个错误(jQuery 2.2.3 和 Firefox 46.0.1)。我有 (A) 一个表单帖子,它导致 (B) 一个 iframe 加载了 jQuery 代码,该代码 (C) 在 iframe 的父级中创建了元素。其中一些有一个匿名函数来处理点击事件。单击时,此函数导致 (D) 表单提交,再次提交到 iframe。

The function in (D) worked once, then on the second (and every subsequent) click the above mentioned veto-error occurred. This is a similar setting to what the OP describes: an anonymous jQuery function doing something with a form more than once.

(D) 中的函数工作一次,然后在第二次(以及随后的每一次)单击时发生上述否决错误。这与 OP 描述的设置类似:匿名 jQuery 函数不止一次对表单执行某些操作。

With that theory, I refactored my whole solution to avoid this and got rid of the error.

有了这个理论,我重构了我的整个解决方案以避免这种情况并摆脱了错误。

Here's the workaround that did it in my case: I have a javascript function in the page (outside the iframe) to handle what I want to do.

这是在我的情况下的解决方法:我在页面(iframe 之外)中有一个 javascript 函数来处理我想做的事情。

function myclick(e)
{
  if (!$(e.target.hasClass('wantclick'))) return;
  actualstuff();
}

I bind onclick='myclick(event);'to the div where the jQuery code from the iframe places new stuff into. Inside the iframe, I have jQuery do .addClass('wantclick').

我绑定onclick='myclick(event);'到 iframe 中的 jQuery 代码将新内容放入其中的 div。在 iframe 中,我有 jQuery do .addClass('wantclick')

回答by RC.

I had the very same error on my firefox 57, Linux mint 14.04 I was working on some project with jquery. At first the error didn't pop until I did a POST request and used complete()callback method to process the jqXHR object (see deprecation notice), that's how it appeared in the console. But the symptoms were always here: My browser was kind of hanging, so I had to press F5 each time. I commented some alert(JSON.stringify(jqXHR))and the error disappeared, not the symptoms.

我在我的 firefox 57、Linux mint 14.04 上遇到了同样的错误我正在用 jquery 做一些项目。起初错误没有弹出,直到我做了一个 POST 请求并使用complete()回调方法来处理 jqXHR 对象(请参阅弃用通知),这就是它在控制台中的显示方式。但症状总是在这里:我的浏览器有点卡死,所以我每次都必须按 F5。我评论了一些alert(JSON.stringify(jqXHR)),错误消失了,而不是症状。

I checked with Chrome and Chromium, no such error. I could not say what was the reason, but I had it resolved simply by restarting my browser but possibly a cache issue with Firefox

我检查了 Chrome 和 Chromium,没有这样的错误。我说不出是什么原因,但我只是通过重新启动浏览器解决了这个问题,但可能是 Firefox 的缓存问题

Hope it will help.

希望它会有所帮助。