unable to click option within select tag

Experiences, small talk, and other automation gossip.
PaulineSinclair
Posts: 1
Joined: Wed Sep 06, 2017 9:27 am

unable to click option within select tag

Post by PaulineSinclair » Wed Sep 06, 2017 9:48 am

hi, currently i am having a combo box which is identified as SelectTag in ranorex.
I need to click option within that combo box.
Code which i have written:
Ranorex.SelectTag searchCombo = ecmMainPage.FindSingle("/dom[@domain='" + Constants.SERVER_PORT + "']//select[@id='select_savedsearches']");
searchCombo.Focus();
searchCombo.Click();
Ranorex.OptionTag savedSearch = searchCombo.FindSingle("/dom[@domain='" + Constants.SERVER_PORT + "']//select/optgroup[@label='LocalSearch']/option[@InnerText='mysearch']");
savedSearch.Focus();
savedSearch.Click();
Please let me know.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: unable to click option within select tag

Post by odklizec » Thu Sep 07, 2017 11:28 am

Hi,

Please post a Ranorex snapshot (not screenshot!) of the problematic select tag. Eventually, please post a HTML sample code of given combo box. Without (at very least) Ranorex snapshot, it's hard to suggest something reliable. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration