javascript - Javascript 在 Google 表单上设置下拉值
问题描述
我创建用户脚本/插件来填写谷歌表单的输入,但我无法更改下拉列表的值。
演示页面和我尝试过的
document.querySelector('.quantumWizMenuPaperselectOption.exportOption').click()
document.querySelectorAll('.quantumWizMenuPaperselectContent.exportContent')[1].click()
解决方案
解决了,所以有4个元素.quantumWizMenuPaperselectContent.exportContent
所以我需要选择最后一个元素
document.querySelectorAll('.quantumWizMenuPaperselectContent.exportContent')[3].click()
或更改选择器
document.querySelectorAll('.exportSelectPopup div span')[1].click()
推荐阅读
- rxandroidble - 编译失败 https://github.com/Polidea/RxAndroidBle
- c# - 我想从文件中检索数据
- javascript - 如何设置spherebuffergeometry的垂直角度?为什么旋转网格时轨道控制无法正常工作?
- google-api - 如何使用谷歌课堂 API 访问所有“分配”
- javascript - 选择框onchange时更新mysql表中的值
- android - 如何禁用BottomSheetDialogFragment在外部触摸时被解雇
- react-native - 从具有多个输入字段的动态页面中获取答案
- azure-devops - AzureDevOps `dotnet build` 项目路径的语法是什么?如何为 `dotnet build` 项目路径添加多个项目?
- android-studio - 当我尝试了官方文档中提到的所有内容时,如何将我在 Android Studio 中的颤振项目迁移到 Android X 兼容性。?
- linear-programming - 如何在 Pyomo 中为约束添加名称?