How to select specific item in drop down list by the item's index

I found a solution to this problem. By using Inject Js script activity since none of the solution above worked for the scenario i had.

function get_id()
{
if(document.readyState ===“complete”)
{
document.querySelector(‘#cars’).value=‘7’
}
}