Hi Ciege,
Thanks man it works after some modifications.
I had to change listitem to Optiontag, cause when i used listitem it complained and didnt find the dropdown box items. With Optiontag, which it was when i checked in Ranorex Spy, your code worked fine

Thanks again, only issue i have is that it takes long time to click the dropdown item (around 3-4s) even when i removed all your delays. If you have any suggestions please let me know.
Support Team wrote:Are you sure? Ranorex always uses element identification and just uses relative positions within the elements to further specify click locations.
Do you get a
technology limitation warning?
Regards,
Alex
Ranorex Team
Hi Alex,
Thakns for reply, well i've checked the code when recording and this is what i see:
It clicks on dropdownlist but after that it clicks on something called "Dropdown.Self", which is same for all items in the dropdown item.
I wanted to do like Ciege did, provide a dropdownitem name and then click on that.
Code: Select all
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Up item 'SiriusGP.dropdownList' at 203;17.", repo.SiriusGP.dropdownListInfo, new RecordItemIndex(1));
repo.SiriusGP.dropdownList.MoveTo("203;17");
Mouse.ButtonUp(System.Windows.Forms.MouseButtons.Left);
Delay.Milliseconds(1350);
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Dropdown' at 65;10.", repo.Dropdown.SelfInfo, new RecordItemIndex(2));
repo.Dropdown.Self.Click("65;10");
Delay.Milliseconds(1190);
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SiriusGP.dropdownList' at 152;15.", repo.SiriusGP.dropdownListInfo, new RecordItemIndex(3));
repo.SiriusGP.dropdownList.Click("152;15");
Delay.Milliseconds(1320);
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Dropdown' at 65;18.", repo.Dropdown.SelfInfo, new RecordItemIndex(4));
repo.Dropdown.Self.Click("65;18");
Delay.Milliseconds(2210);
Thanks again both
