Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

循环切换下拉选项的问题 #408

Open
hita0 opened this issue May 28, 2024 · 6 comments
Open

循环切换下拉选项的问题 #408

hita0 opened this issue May 28, 2024 · 6 comments

Comments

@hita0
Copy link

hita0 commented May 28, 2024

PixPin_2024-05-29_00-44-52
如图中的下拉选项,应该怎样跳过第二项的横线进行循环?

@hita0
Copy link
Author

hita0 commented May 28, 2024

软件不能针对选项索引值进行循环?
我加了一个js
var select = document.getElementByNames("m_yxdh")[0];
select.selectedIndex++;
代码报错
错误为: Message: javascript error: {"status":32,"value":"Unable to locate an element with the xpath expression because of the following error:\nSyntaxError: Failed to execute 'evaluate' on 'Document': The string '' is not a valid XPath expression."}

@NaiboWang
Copy link
Owner

试一试添加两个切换循环选项操作,类型为切换到下一个选项,我也没有具体操作过。

@hita0
Copy link
Author

hita0 commented May 29, 2024

哦 这个我没有说明白,就是选择任意一个选项之后都会变成这样,被选择项出现在第一个,横线是第二个,试过多个循环也不行。

@hita0
Copy link
Author

hita0 commented May 29, 2024

可不可以用python或js命令按照索引值切换?

@NaiboWang
Copy link
Owner

理论上都是可以的,你可以看下我的源码怎么写的,思路都差不多。

@115305411
Copy link

问一下这个问题解决了吗?我也尝试循环里设置切换下拉选项,只能切换一次,循环类型我也尝试切换不同类型但还是不成功

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants