C#FindElement-Xpath中的管道字符

硒C#找不到元素

driver.FindElement(By.XPath(@".//*[@id='nnnn_record|OneToMany|SubGridAssociated|Mscrm.SubGrid.ndis_record.AddNewStandard']/span")).Click();

试图\\|逃脱,但仍然找不到

driver.FindElement(By.XPath(@".//*[@id='nnnn_record\\|OneToMany\\|SubGridAssociated\\|Mscrm.SubGrid.ndis_record.AddNewStandard']/span")).Click();

'\|' is not allowed in Visual Studio
kuuipoio 回答:C#FindElement-Xpath中的管道字符

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3147792.html

大家都在问