Open brunoshine opened 8 years ago
There are other events that don't get triggered too, but I agree that change is the most important and this has annoyed me in the past.
You can overcome it by dropping down to Selenium Web Driver, but that code's not as nice of course.
I'm happy for you or someone else to submit a pull request to add the change()
call.
Hi,
when using the
DropDown.SelectElementByText
thechange
event on the client-side is not triggered. A simple change to the TestStack.Seleno/PageObjects/Controls/DropDown.cs method change can fix this:From:
var scriptToExecute = string.Format("$('#{0} option:contains(\"{1}\")').attr('selected',true)", Id, optionText.ToJavaScriptString());
To:
var scriptToExecute = string.Format("$('#{0} option:contains(\"{1}\")').attr('selected',true).change()", Id, optionText.ToJavaScriptString());
Cheers, Bruno