-1

I'm currently trying to simulate clicks, for example on wizzair website you can simple select

document.getElementById("ControlGroupRibbonAnonNewHomeView_AvailabilitySearchInputRibbonAnonNewHomeView_AutocompleteOriginStation").click();

This will select and promote "drop down list" I have hard time trying to select an option of that list

document.querySelector("div.wrap ul.group li[data-iata=EIN]").click()

how do you simulate the next click ?

Madara's Ghost
  • 172,118
  • 50
  • 264
  • 308
Taziz
  • 73
  • 1
  • 6
  • This previous question might be useful: http://stackoverflow.com/questions/2490825/how-to-trigger-event-in-javascript Also, please check this other question: http://stackoverflow.com/questions/906486/how-can-i-programmatically-invoke-an-onclick-event-from-a-anchor-tag-while-kee – angel9215 Feb 07 '16 at 09:54
  • Well I'm not in charted of the interface since I'm creating a crawler – Taziz Feb 07 '16 at 10:07

1 Answers1

0
<select>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    <option>5</option>
</select>

$('select>option:eq(3)').prop('selected', true);
Fr4ncx
  • 356
  • 6
  • 22