我正在将 selenium webdriver 与 java 一起使用,我无法从页面上总共 6 个类似元素中找到一个特定按钮。我尝试使用带有“value”属性的 XPath:-//input[@value = 'New PAN for Indian Citizens (Form 49A)'] 但无法找到该元素。所有 6 个按钮的 HTML 如下:-
<input type="submit" onclick="javascript:popitup('0','',false);" style="{width:22em}" value=" New PAN for Indian Citizens (Form 49A) " name="submit">
<input type="submit" onclick="javascript:popitup('5','',false);" style="{width:22em}" value=" New PAN for Foreign Citizens (Form 49AA) " name="submit">
<input type="submit" onclick="javascript:popitup('1','',false);" style="{width:22em}" value="Changes or Correction in PAN details" name="submit">
<input type="submit" onclick="javascript:popitup('1','',false);" style="{width:22em}" value=" Reprint of PAN card " name="submit">
<input type="submit" onclick="javascript:popitup('2','',false);" style="{width:22em}" value=" Transaction Status Enquiry " name="submit">
<input type="submit" onclick="javascript:popitup('3','',false);" style="{width:22em}" value=" Status Track for PAN application " name="submit">
请帮助我的人。. . 提前致谢