Variable '${username1}' not found Variable using Robot Framework with DataDriver library

The error Variable '${username1}' not found. could be caused by one or more of the following reasons:

  1. The CSV file uses commas in the header instead of semi colons
  2. There are spaces in the CSV headers
  3. The arguments within the template keyword don't match up with the embedded variables in the test case.

It looks like issue 3 is definately the case in your code so you would need to change your Validate Unsuccessful Login to the following:

Validate Unsuccessful Login
    [Arguments]     ${username}        ${password}
    open the browser with the Mortgage payment url
    Fill the login Form     ${username}        ${password}
    wait until it checks and display error message
    verify error message is correct

Then inspect your csv file

This style is valid:

*** Test Cases ***;${username};${password};[Tags];[Documentation]

This style causes the error:

*** Test Cases ***,${username},${password},[Tags],[Documentation]

And this also cause the error:

*** Test Cases ***; ${username}; ${password}; [Tags]; [Documentation]