Select an option in website’s mobile version (responsive mode)

Tags: , , , ,

How can I select a size option from, when I’m browsing it in responsive mode? I tried it with document.querySelector("#size-options > option:nth-child(2)").selected = "selected"; but it doesn’t work.

In desktop mode the method document.querySelector("#size > option:nth-child(3)").selected = "selected"; works as expected.


You can use
document.querySelector("#order_billing_country").value = "countryCode";
and it will work on both desktop and mobile.
The UI on mobile never gets updated, but when you press process payment, the right value is sent to Supreme.

Source: stackoverflow