separators within widgets

Ask general questions here.
mander95
Posts: 58
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;
}
}
}
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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