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 verify dropdown values

devdev Members
edited November -1 in Sahi - Open Source
Hi,

I need to verify dropdown vlaues
Ex;
Test1, dropdown contain following following vlaues
value A, value B, value C.

Now I need to write a scripts which verify those values are exist in Test1 dropdown.
I can use following command for this
_setSelected(_select("Test1"), "value A");
_setSelected(_select("Test1"), "value B");
_setSelected(_select("Test1"), "value C");

Is there any better way to do this

Comments

  • narayannarayan Administrators
    _assertEqual(_option(_select("Test1"), "value A"))

    would be a better way.
  • devdev Members
    Thanks Narayan
This discussion has been closed.