Counting total number of options available in dropdown

hey
Please let me know where the value return by getNumberOfTotalOption is stored. I write the script:

TotalOptions = WebUI.getNumberOfTotalOption(findTestObject(‘By index/Page_Devnagri/select_Hindi - Punjabi - Tam’))

println(‘No of Roles are :’ + TotalOptions)

‘Verifying the number of Options in the dropdown with Expected result’

WebUI.verifyEqual(TotalOptions, 8)

This does not show any error. But where it is showing the value which is stored in variable TotalOptions

Please let me know where the value return by getNumberOfTotalOption is stored.

The returned value is not stored in a variable. It is calculated everytime getNumberOfTotalOption is called.

You can read the source code of the getNumberOfTotalOption keyword here:

line 80:

int num = select.getOptions().size()...return num

See also

thanks for reply