I have a web page dialog and in there is a Select Drop down called "Encounter Type". I want to select a specific encounter type. (note that some options might be hidden and a scroll bar might appear).
I have attached the snapshot of the "Encounter Selector" Dialog
Screen shot of application showing this drop-down.
My Repository.
.
Code: I want to select the encounter type of "other"
...
...
Repo.WebDocumentEncounter_Selector.SelectTagSelEncounterType
.RMouseClick(message: "Mouse clicked 'Encounter Type' dropdown", delay: 250); //Mouse click to open the dropdown.
OptionTag tag = Repo.WebDocumentEncounter_Selector.SelectTagSelEncounterType.FindSingle("./option[@innertext='Other']");
m_Logger.ReportInfo("----------> " + tag.Visible.ToString());
tag.EnsureVisible(); // I am using ensure visible with the hope that it will scroll the list if the option is not in the visible area.
m_Logger.ReportInfo("----------> After Ensure Visible " + tag.Visible.ToString());
//Issue #1
tag.PerformClick(); //Weird issue. This select the option "CDA" eventhough tag show inner text of "Other"??
//Other options I tried...:
//tag["selected"] = "selected"; //Again selected "CDA". Weird?
Issue #2
//tag.Selected = true; // this selected "Other" however the "OK" button on the dialog is not getting enabled. i.e. App is not seeing the selection.
So:
1. I need to know why Issue #1 is selecting "CDA" when 'tag' option object is for "Other"? This is a bug.
2. What options do I have for issue #2.