18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

select an item on a popup menu?

BradPackBradPack Members
edited November -1 in Sahi - Open Source
I am trying to select one item on a popup menu

the options/values I want to select (one at a time) are:

Section
Grid
Summary Story
Full Story


If I Control mouse over the menu I get this assert:

_assertExists(_textbox("input_44"));
_assert(_isVisible(_textbox("input_44")));
_assertEqual("Section", _getValue(_textbox("input_44")));

How can I select a particular option on that popup menu?

I tried this but it does NOT work.

_setSelected(_select("input_44"), "Section");


Thank You!


Brad


==========================

Windows Vista Business

Firefox 3.6.25

Sahi

Version :
V3.5
Build :
2011-04-04

Comments

  • Hi BradPack,

    Try using this:

    _popup("pop up window name")._setSelected(_select("input_44"), "Section");

    Regards
    Sumitra
  • BradPackBradPack Members
    edited January 2012
    Thank you Sumitra for your reply.

    I am trying to select an item on a popup menu (not a popup window) so I'm not sure that will work.

    the popup menu is similar to the one here: w3schools.com/js/tryit.asp?filename=tryjs_putdropdown

    (I can't send you a link to the actual menu because it is behind a firewall and only accessible on a local network)

    Thank You,

    Brad
  • Hi BradPack,

    I am able to select a value from this url w3schools.com/js/tryit.asp?filename=tryjs_putdropdown
    for the dropdown list.

    ie: _setSelected(_select("myList"),"Firefox"); // able to select firefox from the dropdown list.

    Let me know if you facing this issue on all the browsers and with all the dropdown lists?

    Also,could you please try using the latest version of Sahi and check if it solves yours issue.

    Regards
    Sumitra
Sign In or Register to comment.