I\'m trying to crawl the sizes for this product:
Link to product
The problem: The sizes are loaded after the color of the product is selected.
In th
tejesh95's solution worked for me with a few minor changes, #1 I couldn't get findElementById to work so switched it to 'document.querySelector('#selectorId)' . I also had to change 'onchange' to 'onclick'. Here's the code within the casperjs test harness:
casper.then(function() {
this.evaluate(function() {
var select_element = document.querySelector('#selectorId')
select_element.value = 'stringValue'
select_element.onclick
})
})
Follow on note: Your mileage may vary on the above, I found inconsistent results elsewhere, the text value would update, but the underlying control wouldn't fire. Frustrating!