¿How to use elseif? i keep getting [error] e.forks is undefined

first of all when i click info on this command it takes me to

https://ui.vision/rpa/docs/selenium-ide/if where the word elseif doesnt appear anywhere in the page

CODE:

  {
      "Command": "if_v2",
      "Target": "${url} == \"google\"",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "1",
      "Value": "mail"
    },
    {
      "Command": "elseif",
      "Target": "${url} == \"hotmail\"",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "2",
      "Value": "mail"
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    },

I updated the website and added “else if”. Thanks for the hint :wink:

But I can not recreate the error with V5.3.8. When I run your macro all works fine:

i pasted the whole code in json and tried to run but is giving me error.


can you pl. help me to run it successfully?

Thanks
sg

You need to define the variable first. For example with:

store | hello | url

what i understood is


but it is not worked for me.

One of the many things that Kantu dose great is the Info for this command button next to the command selector (I think I have almost read all of the entries).

However, the reason that your command is failing is that you have stored hello inside of the string https://www.google.com/ and the if command it trying to check variable ${url} which dose not exist in your example.

What admin was trying to show you was was how you store things so if you want to store a URL inside the URL variable, you must type in the value that you want inside of your variable into the Target field and the variable name into the Value.

I.e.
Command | Store
Target | Where you wish to go / store (in this case https://www.google.com)
Value | Variable name (in this case the word URL)