Winium.Desktop
Winium.Desktop copied to clipboard
Not able to identify Element that does not have ID, Name & Class
Hi All, I am trying to identify list items that are present under a list . i Dentified the list item by using class name - ReadOnlyCollection<IWebElement> lists = driver.FindElements(By.ClassName("ListBox")); But the elements inside the list dont have a class name/name or ID. They have a control type - ControlType.ListItem. Culture: "(null)" AutomationId: "" LocalizedControlType: "list item" ClassName: "" ControlType: "ControlType.ListItem"
Can i identify the child items of the list by using this control type ?? I am stuck at this point and need this to be resolved to move forward :(
"Name: " also empty?
Hey @suniti2302 : you may find element that does not contain AutomationId or className by making their xpath one way to make xpath is
driver.findElementByClassName("ListBox").click(); then String XPath = "//*[contains(@Name,'WhateverTheNameIs')]"; driver.findElementByXPath(XPath).click();
for further details on how to make xpath, please refer to the link below https://github.com/2gis/Winium.Desktop/issues/111
Hi , I am trying to identify element for button, using UIspy and Inspector.exe But the elements inside the button don't have a class name/name or ID. How could I get the button click event ? I also tried with text() in xpath but no luck found to run without error (On button UI, I can see name with "New Project but using text() there error is shown no such element found ") Would be helpful if someone help here. Thanks in advance
Hi Varun,
I am facing the same issue. Do you have any solution for the same? Thanks in advance.