How to write assert statements for verifying the values of a dropdown field

Hi,

I need to verify the values of a dropdown on webpage using Kantu webautomation tool.
Can you help with the syntax for verifying the actual & expected values of a dropdown.

I tried with asserttext, assertvalue, assertelement but it didnt work.

Regards,
Mitesh Chheda

Hi,

Can someone respond to my query.
Appreciate your help!

Regards,
Mitesh Chheda

Why does assertValue not work for you? It should be the right command for this task.

Here is a test macro and it works ok:

{
  "Name": "Untitled",
  "CreationDate": "2018-12-10",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://a9t9.com/kantu/demo/storeeval",
      "Value": ""
    },
    {
      "Command": "select",
      "Target": "id=tesla",
      "Value": "label=Model 3"
    },
    {
      "Command": "storeValue",
      "Target": "id=tesla",
      "Value": "v1"
    },
    {
      "Command": "echo",
      "Target": "v1=${v1}",
      "Value": ""
    },
    {
      "Command": "assertValue",
      "Target": "id=tesla",
      "Value": "3"
    }
  ]
}

{
“Command”: “assertText”,
“Target”: “id=dropdown_Id”,
“Value”: “label=dropdowncontainer TextValue”
}
or you can use command verifyText - only to verify, where as assert will stop going to next step