Mo.
Mo.

Reputation: 42573

checking current selection or value in a dropdown list using selenium

HI

i was wondering if there is a way to check what is the current selected value in a drop down list using selenium ruby?

thanks

Upvotes: 0

Views: 833

Answers (1)

AutomatedTester
AutomatedTester

Reputation: 22428

You can use the verifySelectedX calls to do this.

So to check the label it would be assert_equal "bar", @selenium.get_selected_label("foo")

or to do the value of that item it would be assert_equal "bar", @selenium.get_selected_value("foo")

Upvotes: 1

Related Questions