我正在用硒进行屏幕刮擦。我有一个问题,
我试图访问HTML输入(通过id),但c#告诉我这是不可见的,但我可以看到它。
这是c#异常:
Element is not currently visible and so may not be interacted with
但是看到这个我尝试用Firefox的selenium扩展,并且访问的命令很奇怪。
如何从c#代码访问此输入?
感谢。
edit1:这是HTML:
<input type="text" value="" name="pxfirstname1" id="pxfirstname1" style="background-color: rgb(255, 255, 255);">
我也检查了CSS并没有任何隐藏选项。
Edit2:我尝试导出到C#,但这是结果:
这是代码:
//code
driver.FindElement(By.Id("conSelC12")).Click();
driver.FindElement(By.Id("submitInfo")).Click();
// ERROR: Caught exception [Error: Dom locators are not implemented yet!]
// ERROR: Caught exception [Error: Dom locators are not implemented yet!]
driver.FindElement(By.Id("searchInf")).Click();
//more code
// ERROR: Caught exception [Error: Dom locators are not implemented yet!]
其他命令正常
答案 0 :(得分:0)
您应该能够从插件中将代码导出到C#,然后您可以将他们建议的C#与您现有的C#进行比较并查看问题或者至少有可用的C#代码