separators within widgets

Ask general questions here.
mander95
Posts: 66
Joined: Tue Jun 21, 2016 7:35 pm

separators within widgets

Post by mander95 » Thu Jul 28, 2016 2:16 pm

trying to make a function that creates a list or table of the separators within this widget and clicks them if they match an input string, I also attached the snapshot

in sudo:

void (string inputString){
IList<Separators> separatorList = new List(repo.NameOfWidget.Element);
foreach(Separator patientFile in sparatorList){
if(patientFile.GetAttributeValueText("accessibledescription") == inputString){
patientFile.click();
break;
}
}
}
Attachments
patientElementSnapshot.rxsnp
(462.01 KiB) Downloaded 29 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: separators within widgets

Post by Support Team » Fri Jul 29, 2016 11:38 am

Hello mander95,

You could use somthing similar to that:
public void ClickSeperators(string inputString)
		{
			Form root =  "/form[@title='VECTRA']";
			
			foreach (Separator element in root.FindChildren<Separator>()) {
				
				if(element.Element.GetAttributeValueText("accessibledescription") == inputString)
				{
					element.Click();
				}
			}
		}
Hope this helps :)

Sincerely,
Robert
.
Image