If my understanding is NOT correct regarding using the user name and password, then how can I be able to enter my user name and password during the run time???
Thatâs what weâre trying to resolve
I added the breakpoint on the line WebUI.click(findTestObject(âObject Repository/folder10/input_Password_btn btn-default hidden-xsâ))
and here is what I get
and the FF browser
And what happens if you click âSign Inâ manually at this point?
Ok weâre getting closer. I suspect that the implementation of the WebUI.setEncryptedText() method is not working as intended for your field. Please try this approach instead of the WebUI.setEncryptedText() method:
import com.kms.katalon.util.CryptoUtil
CryptoUtil.CrytoInfo cryptoInfo = CryptoUtil.getDefault('vhY2RXFFBgI=')
String rawText = CryptoUtil.decode(cryptoInfo)
WebUI.sendKeys(findTestObject('Object Repository/folder01/input_Password_password'), rawText)
Thereâs a âtip in waitingâ if ever I saw one. Thanks Brandon.
Thatâs assuming that we get it working Weâll seeâŚ
I meant the alternative crypto lib. Good to know!
whispers quietly*: I just ripped it from the source for the source for the keyword⌠Donât tell anyone
I have no idea WHAT youâre talking about⌠(whistling cheerfully, he walks awayâŚ)
Yes, that is the default. Iâm not sure whether that setting will affect what youâre trying to do.
replacing the line
WebUI.setEncryptedText(findTestObject(âObject Repository/folder10/input_Password_passwordâ), âvhY2RXFFBgI=â)
by
CryptoUtil.CrytoInfo cryptoInfo = CryptoUtil.getDefault(âvhY2RXFFBgI=â)
String rawText = CryptoUtil.decode(cryptoInfo)
WebUI.sendKeys(findTestObject(âObject Repository/folder10/input_Password_passwordâ), rawText)
Did not fix any thing
Wow, then Iâm really stumpedâŚ
Ok please run this again in debug, with the same breakpoint as before, and confirm the following for me:
1.) When the script pauses at the breakpoint, Katalon should switch you to the Debug perspective, if you arenât there already:
In the debug perspective, you should see a âVariablesâ tab somewhere, probably next to the Console:
Click on that tab, and then click on the ârawTextâ row, and tell me what value you see for that variable. It should match the actual (decrypted) password of â158503â.
2.) In your browser, after the value is entered in the field and the script has paused, please right click on the field and click âInspectâ, then take a screenshot of the HTML for the field. The element in question is probably an <input>
element.
Ok, so we know that your code is putting the correct password into the correct field for sure. That takes care of the first item. Now for the second item, can you please take a screenshot of that same HTML element, but after youâve entered the password manually, without using Katalon at all. Iâm trying to see if the JavaScript for the page is actually capturing the keystrokes that Webdriver is simulating.
Without Using Katalon at all. Katalon is not running on my laptop now.
User Name inspect element
Password inspect element
Ahmed
Iâll defer to Brandon, of course, but since he seems to not be around right now, I want to point out something I noticed while studying your images.
In the last image, where you were capturing the workflow when the site was operated manually, there is an event wired up to the control. Firefox shows this as a small button âeventâ in the Inspector next to the control.
In the earlier image, where you were operating the app via Katalon and had set a breakpoint, there is no evidence the same control has an event handler attached. This is likely very significant.
If the following is how your code looks nowâŚ
WebUI.setText(findTestObject(âObject Repository/folder01/input_User Name_usernameâ), âff_asâ)
WebUI.setEncryptedText(findTestObject(âObject Repository/folder01/input_Password_passwordâ), âvhY2RXFFBgI=â)
then please add some delay â perhaps ensuring your elements are âreadyâ. You might also try a fixed (very silly) delay just to see if weâre on the right track:
WebUI.delay(5)
WebUI.setText(findTestObject(...), âff_asâ)
WebUI.setEncryptedText(findTestObject(...), âvhY2RXFFBgI=â)
Let us know how you get on.
In addition, you could let us know what the event contains (click it and try to capture the event handler content).