How to set text to the dialog box which doesn't have xpath

I got the web link in which we need to set the details in the dialog box. Every time I need to key the logon details manually. Is there any way to do it automatically.

Try this:

Here is the example:

Thanks for your reply. But I’m still getting getting the error.image

I need to see your code.

I need to see your the complete error message.

05-23-2021 10:59:00 AM authenticate(“https://”, “userId”, “password”, 30, OPTIONAL)

Elapsed time: 12.514s

Unable to navigate to authenticated page (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to navigate to authenticated page. Reason:
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailedWithReason(WebUIKeywordMain.groovy:70)
at com.kms.katalon.core.webui.keyword.builtin.AuthenticateKeyword$_authenticate_closure1.doCall(AuthenticateKeyword.groovy:91)
at com.kms.katalon.core.webui.keyword.builtin.AuthenticateKeyword$
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
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:72)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.authenticate(WebUiBuiltInKeywords.groovy:2670)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$authenticate$ Source)
at TXQ logon:24)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(
at com.kms.katalon.core.main.TestCaseExecutor.runScript(
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(
at com.kms.katalon.core.main.TestCaseExecutor.execute(
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(
at com.kms.katalon.core.main.TestSuiteExecutor.execute(
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$ Source)

Sorry, I have no idea what’s going on there. Let’s see if these guys can help:

@kazurayam @bionel @grylion54
@ThanhTo @duyluong

Don’t call WebUI.navigateToUrl() before authenticate().

Currently you do:

WebUI.navigateToUrl("url string")
WebUI.authenticate("url string")

You should rather do:

WebUI.authenticate("url string")

Thanks for your reply, but it not working

Which Browser are you using?

The source of WebUI.authenticate() keyword at here. I noticed that this keyword works only for Chrome, Firefox and IE. It would not work for other browsers, such as Safari, Edge.

Also it is possible that recent versions of Chrome, FireFox has changed to be more and more strict about security. Therefore the WebUI.authenticate() keyword may loose power against newer versions of browsers.

How to cheat browsers for authentication using Selenium — this problem is a cat-and-mouse game.

A classic approach to pass Basic Authentication is to insert username and password in the URL string.


@kazurayam Thanks. The classic approach is worked, but when I navigate to next page from the home page the new page is not loading correctly
Home page

Next page load by selecting options from file menu

Congrats! Perhaps you found a bug of your AUT!

You should report what you found to your development team, not to the Katalon Forum.

@kazurayam When authenticate the url manually the next page loads fine I can able proceed the next steps without any problem. I think due to some security reason I can’t able to authenticate the url using keyword. Anyway thanks for help