[WebUI] Verify Option Present By Label

This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/webui-verify-option-present-by-label.html

What is the difference between ‘Verify Option Present By Label’ and ‘Verify Option Present By Value’? As per the examples provided, it pretty much looks same.

It’s because on the demo website, label and value are equals

When you select look like

  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>

with Verify Option Present By Label you will search Volvo, Saab etc
with Verify Option Present By Value you will search volvo, saab etc
WebUI.verifyOptionPresentByLabel(findTestObject('Page_A/select'), 'Mercedes', false, 20) is true and
WebUI.verifyOptionPresentByLabel(findTestObject('Page_A/select'), 'mercedes', false, 20) is false