-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
select fields change value #20
Comments
Thank you for your proposal. Unfortunately there are two problem here:
I will try to find a solution to enable a correct select behaviour in Resurrectio. |
ebrehault, have you find solutions to avoid the trigger change event? For now, I follow shacky's idea to work around this issue (without the jQuery part)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It wasn't implemented, so quick work around in casper.js:
CasperRenderer.prototype.change = function(item) {
var tag = item.info.tagName.toLowerCase();
if(tag=='select') {
var selector;
selector = this.getFormSelector(item) + this.getControl(item);
selector = '"' + selector + '"';
this.stmt('casper.waitForSelector('+ selector + ',');
this.stmt(' function success() {');
this.stmt(' test.assertExists('+ selector + ');');
this.stmt(' this.evaluate(function(valueOptionSelect){');
this.stmt(' $('+ selector +').val(valueOptionSelect);');
this.stmt(' $('+ selector +').trigger("change");');
this.stmt(' },"'+ item.info.value +'");');
this.stmt(' },');
this.stmt(' function fail() {');
this.stmt(' test.assertExists(' + selector + ');')
this.stmt('});');
}
}
The text was updated successfully, but these errors were encountered: