简体   繁体   English

c#中的selenium cssselector用于kendo小部件

[英]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.

相关问题 C#Selenium-显式等待By.CssSelector(…) - C# Selenium - Explicitly waiting By.CssSelector(…) Selenium C# 搜索带有 ID 属性的结果到 CssSelector - Selenium C# search with ID attribute results in to CssSelector CssSelector无法通过ID查找元素(Selenium Webdriver C#) - CssSelector cannot find element by Id (selenium webdriver C#) 如何在 Selenium C# 的 Visual Studio 中使用 findElement(By.cssSelector("")) - How to use findElement(By.cssSelector("")) in Visual Studio in Selenium C# Selenium C# Find Both Attribute And CSS Class, Using XPath or CssSelector - Selenium C# Find Both Attribute And CSS Class, Using XPath or CssSelector 如何使用硒C#将Kendo下拉值存储在变量中 - How to store Kendo dropdown value in variable using selenium c# 为什么我不能使用 (C#) Selenium By.CssSelector() 访问一些 Salesforce DOM 元素,而我可以在它们的“远距离”祖先节点下“看到”它们 - Why can't I access some Salesforce DOM elements with (C#) Selenium By.CssSelector(), when I can 'see' them under their 'distant' ancestor nodes 具有Kendo UI的C#Selenium Web驱动程序:如何完全填充kendo下拉列表 - C# Selenium Web Driver with Kendo UI: How to wait for the kendo drop down list is fully populated 用硒找不到CssSelector - Can't find CssSelector with Selenium 如何使用 C# 中的 CssSelector 创建一个循环,将 tr 递增 1,最多 100 次 - How to create a loop that increments a tr by 1 with a max of 100 time using a CssSelector in C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM