Hi guys,
Good day, have a question on Findings Page elements through coded steps. Hope you guys can assist me :)
I'm trying to locate an element in an IE web browser through coded step using Find.ByAttributes() without any luck.
These are the attributes i'm using to detect in my Find.ByAttributes() coded step :
1) TagName
2) InnerText
3) role
These are the code snippet that i'm using :
Element record = Find.ByAttributes("TagName=td","InnerText=~" + ((string)(System.Convert.ChangeType(Data["Name"], typeof(string)))), "role=gridcell");
Assert.IsNotNull(record, "Record not found.");
For InnerText attribute, i'm would like to read a partial value from an excel sheet (NameExcel.PNG) and i'm using "~" as based in the documentation,"~" signifies partial
Name.PNG is the element i'm looking to read in the browser
But every time i run the script, my Assert fails (ElementLog.PNG) which is weird because as you can see in (Element.PNG), the same attributes can be detected by Telerik if i recorded and use "Edit Element" option.
Another question is, will the below code snippet be able to click on the element once it's detected?
ActiveBrowser.Actions.Click(record);
The whole idea of this script is to detect the element that contains these attributes and click on it.
Many thanks in advance :)
Best Regards,
Pravin
praja@dongenergy.dk