错误:捕获异常[错误:不支持的命令[addSelection |] [英] ERROR: Caught exception [ERROR: Unsupported command [addSelection |]
问题描述
我正在使用带有C#的硒Web驱动程序,并尝试在可用列表中选择一个项目时,我收到以下错误消息:
I am using selenium web driver with C# and on trying to select an item on the available list I am receiving an error as:
错误:捕获到异常[错误:不支持的命令[addSelection |
ERROR: Caught exception [ERROR: Unsupported command [addSelection |
有人可以帮我吗?有什么解决方法吗?
Can someone help me with this? Any workaround?
我正在尝试从左侧的列表中选择一个项目,然后单击按钮(>)将其移至右侧.
What I am trying is to select an item from a list which is on the left side and then click on the button (>) to move it to the right side.
推荐答案
Select selectbox = new Select(driver.findElement(By.id("MY ID")))); selectbox.selectByIndex(2);
Select selectbox= new Select(driver.findElement(By.id("MY ID"))); selectbox.selectByIndex(2);
这篇关于错误:捕获异常[错误:不支持的命令[addSelection |]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!