Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Stable #3

Open
wants to merge 1 commit into from

1 participant

@yanne

Changed error messages to be consistent with Firefox (> 3.10).

Previously, error messages with Firefox were like this:

{"name":"non_existing","validator":"Whatever"}
 {"name":"hello_label","validator":"Hi Flex!"} 

and now they same as with other browser, i.e. like this:

The chain 'name:non_existing' was not found.
Expected "Hi Flex!", got "Hello Flex!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 4, 2011
  1. @yanne
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 4 deletions.
  1. +5 −4 user-extensions.js
View
9 user-extensions.js
@@ -70,20 +70,21 @@ Selenium.prototype.callMovie = function(movie, func, params) {
var id = null;
if (movie.id) {
id = movie.id;
- bridge.setAttribute( 'onClick','window.document.getElementById("ws-sel-bridge").value = window.document.getElementById("' + id + '")["' + func + '"](\''+params+'\');');
+ bridge.setAttribute('onClick','window.document.getElementById("ws-sel-bridge").value = window.document.getElementById("' + id + '")["' + func + '"](\''+params+'\').message;');
}
else if (movie.name) {
id = movie.name;
- bridge.setAttribute( 'onClick','window.document.getElementById("ws-sel-bridge").value = window.document.getElementsByName("' + id + '")[0]["' + func + '"](\''+params+'\');');
+ bridge.setAttribute('onClick','window.document.getElementById("ws-sel-bridge").value = window.document.getElementsByName("' + id + '")[0]["' + func + '"](\''+params+'\').message;');
}
var e = selenium.browserbot.getCurrentWindow().document.createEvent( 'HTMLEvents');
e.initEvent( 'click', false, false);
bridge.dispatchEvent(e);
- if (bridge.value.indexOf('object') != -1) {
+ if (bridge.value != "undefined") {
var res = {};
- res.message = func + ' with params ' + params + ' failed.';
+ res.message = bridge.value;
+ bridge.value = "undefined";
return res;
}
return true;
Something went wrong with that request. Please try again.