[英]selenium cssselector in c# for kendo widget
I am having a hard time understanding CssSelector for an onscreen object I am trying to find (and others that are just like it). 我很难理解CssSelector我想要找到的屏幕上的对象(以及其他类似的东西)。 Give 给
<TH class=k-header id=c9a12c99-612c-4405-9b3d-fd551d03a10c role=columnheader rowSpan=1 jQuery111106564522723473856="19" data-role="columnsorter" data-index="0" data-title="SEQ" data-field="SequenceDays"><A tabIndex=-1 class=k-link href="#">SEQ</A></TH>
I want to identify this object by the tag and the data-title or data-field attribute. 我想通过标记和data-title或data-field属性来标识此对象。
Is anyone able to show me how to do this? 有人能告诉我怎么做吗? C# would be preferable, but Java is ok too. C#会更好,但Java也可以。
Thanks. 谢谢。
In Java: Tag + data title: 在Java中:标签+数据标题:
findElement(By.cssSelector("th.k-header[data-title='SEQ']"));
Tag + data field: 标签+数据字段:
findElement(By.cssSelector("th.k-header[data-field='SequenceDays']"));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.