Password as global variable contains the at sign, @, failed in authentication

I configured my username and password in Profiles and applied them to WebUI.authenticate for Chrome as follows:

Profiles
Name |Value |Description
userName |xxxxx |
password |1j2dx@j35 |

Test Cases
|
| __ Test Case 1

WebUI.openBrowser('')
WebUI.authenticate('url_to_authentication_page',                     GlobalVariable.userName,                     GlobalVariable.password, 5)

Here’s the error message I got:

11-30-2018 06:00:10 PM Test Cases/Methods/Login
Elapsed time: 8.009s
Test Cases/Methods/Login FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to navigate to authenticated page (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to navigate to authenticated page)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.AuthenticateKeyword.authenticate(AuthenticateKeyword.groovy:49)
at com.kms.katalon.core.webui.keyword.builtin.AuthenticateKeyword.execute(AuthenticateKeyword.groovy:42)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.authenticate(WebUiBuiltInKeywords.groovy:2687)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$authenticate$0.call(Unknown Source)
at Login.run(Login:18)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:321)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:312)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:291)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:283)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:222)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1543572008848.run(TempTestCase1543572008848.groovy:22)

I have tried another account without the at sign and it worked like a charm. Moreover, hard coded username and password worked as well:

WebUI.authenticate('url_to_authentication_page',                     'xxxxx',                    '1j2dx@j35', 5)

Anyone happens to know where the problem is?
Thanks in advance.

According to RFC3986 section 3.2.1, @ in URL need to be percent encoded. @ -> %40

Try the following:

Profiles
Name |Value |Description
userName |xxxxx |
password |1j2dx%40j35 |

1 Like