如何使用selenium webdriver选择表单标签下的webElement

时间:2017-03-27 14:57:39

标签: selenium selenium-webdriver selenium-chromedriver

如何单击selenium web驱动程序中Form标签下的元素。使用xpath,id,name它不会被识别。提示屏幕截图Image1 here you will see form tag details

In Image2 you willsee highlighted button id

1 个答案:

答案 0 :(得分:0)

这是一个css选择器:

.container-contact-info input[value='new']

或xpath

//*[@class='container-contact-info']//input[@value='new']

如果您有大量这些表单,这可能无效。如果是这种情况,请使用相关信息更新您的问题,我可以调整此答案。