0

I am using chromeless to change the value of a drop down menu:

var dropDownValue="59"
const screenshot2 = await chromeless
        .evaluate((dropDownValue) => {
            select = document.querySelector('select#category1')
            select.value = dropDownValue
        })

but this is not giving the expected behavior, the drop down menu is set to a "blank" option (which does not even exist in the menu).

What could be going wrong?

Sulli
  • 763
  • 1
  • 11
  • 33

1 Answers1

1

Correct syntax is:

var dropDownValue="59"
const screenshot2 = await chromeless
        .evaluate((dropDownValue) => {
            select = document.querySelector('select#category1')
            select.value = dropDownValue
        }, dropDownValue)

I don't know why this question was voted down. You might be experts at Chromeless, I'm not.

Sulli
  • 763
  • 1
  • 11
  • 33