Closed xrado closed 10 years ago
Thanks for your report. I´ve checked it & yes, you are right, this method calls something internally that does not work correctly, will be fixed in the next release.
Hi, is there any news on this being fixed @asciidisco ? I'm trying to find a way to select a value in a select box but using setValue is throwing the error mentioned above.
Is there an alternative method to selecting a dropdown value?
Ah sorry, I totally forgot about this one. I´m really sorry :/ I´m giving a high priority on my list & get back to you asap.
Since this is still open, I assume that it hasn't been addressed yet. However, I think I have found a workaround for it. This is more directed to @teneightfive ...
Lets say you have:
<select id="myselect">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
And you want to select the second option, "two". Do:
.click('#myselect')
.click('#myselect option[value="two"]')
That is what worked for me!
Edit: This currently won't work with FireFox.
i need to set value empty for an input field …is there any way around for that other than setValue in dalekjs
facing the same problem and also need to set value to blank for an input field. getting { '0': undefined }.
same issue here. please help
Ran into this one yesterday while checking out DalekJS. My workaround was using the execute() method which executes a JavaScript function within the browser context.
So if you are using jQuery on the page you’re running the tests it is as simple as:
.execute(function () {
$('#selector').val('');
})
Fixed in canary
.type('#email','info@example.com') works just fine, but if I replace it with .setValue('#email', 'info@example.com') outputs { '0': undefined } and exits the execution
tested with phantomjs and chrome