Ниже приведен мой код,
*** Settings ***
Documentation This test case is to verify the registration
Library Selenium2Library
Library ExcelLibrary
*** Variables ***
${SERVER} URL
${BROWSER} Firefox
${DELAY} 10
${DELAY1} 20
${CreateAccountLink} //footer[@class='Panel__Footer-kGqwaT kqVeay']//div//a[@href='/signup']
${UsernameTextBox} //input[@autocomplete='username']
${Password} test123
${PasswordTextBox} //input[@minlength='6']
${SignUpButton} //button[@type='submit']
${HeaderAccountNameBtn} //button[@class='Header__AccountButton-leDArq bDGoru']
*** Keywords ***`enter code here`
Registration
Click Link ${CreateAccountLink}
Page Should Contain Button ${SignUpButton}
Open Excel Current Directory robottestdata.xls
${userName} Read Cell Data By Name Sheet1 username
Clear Element Text ${UsernameTextBox}
Input Text ${UsernameTextBox} ${userName}
Clear Element Text ${PasswordTextBox}
Input Password ${PasswordTextBox} ${Password}
Click Button ${SignUpButton}
Set Selenium Implicit Wait ${DELAY}
Page Should Contain Button ${HeaderAccountNameBtn}
Capture Page Screenshot filename=-screenshot-registration.png
Во время выполнения теста я получаю сообщение об ошибке,
UnboundLocalError: локальная переменная 'cellValue', на которую ссылается перед присваиванием
Я обнаружил, что ошибка в 4-й строке, но не смог найти точную причину.