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.

how to do a _setSelected in ruby

wtwhitakerwtwhitaker Members
edited November -1 in Sahi - Open Source
Browser: Chrome
Language: Sahi for Ruby


I am trying to use a control but Sahi does not seem to know how to handle control when using ruby version. The native sahi recorder can use the control but the sahi/ruby recorder cannot

here is the native sahi version
_setSelected(_select("manageMessagesFrm:userRole"), ["EstimateHQAffinity"]);

I tried the following:

@browser.select("manageMessagesFrm:userRole").value = "EstimateHQAffinity"
However, this does not work

Comments

  • SumitraSumitra Members
    Hi wtwhitaker,

    You can use:

    @browser.select("manageMessagesFrm:userRole").choose("EstimateHQAffinity")

    instead of

    @browser.select("manageMessagesFrm:userRole").value = "EstimateHQAffinity" and check if it works.

    Regards
    Sumitra
Sign In or Register to comment.