【发布时间】:2017-10-30 16:51:34
【问题描述】:
比如说我有一个标签:
<a class = "fp-anchor fp-forgot-password pull-right" href = "/Account/ForgotPassword">Forgot Password?</a> == $0
我正在尝试获取元素的类型,我的意思是应该是锚a 标记。或者更准确地说,我需要确定这是否是一个超链接。
类似的,
Driver.FindElement(By.Id("someid")).<whatever selenium webdriver function to identify what type of element it is>
类似地,如果它是一个输入标签,比如说
<input type="text"..../>
它应该将标签标识为input 类型。
任何建议都会有很大帮助。
【问题讨论】: