[英]Chromeless - select drop down value
我正在使用chromeless更改下拉菜單的值:
var dropDownValue="59"
const screenshot2 = await chromeless
.evaluate((dropDownValue) => {
select = document.querySelector('select#category1')
select.value = dropDownValue
})
但這沒有達到預期的效果,因此下拉菜單設置為“空白”選項(菜單中甚至不存在)。
可能出什么問題了?
正確的語法是:
var dropDownValue="59"
const screenshot2 = await chromeless
.evaluate((dropDownValue) => {
select = document.querySelector('select#category1')
select.value = dropDownValue
}, dropDownValue)
我不知道為什么這個問題被否決了。 您可能是Chromeless的專家,但我不是。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.