I wrote a script related to login page of our application, everything is exectued perfect! But in console, I’m not getting any errors, browser is opening but login is getting failed after entering Email ID & password automatically through the script. If you find any solution for this, let me know
hi @qc1
seems the issue is on the entered Text value.
make sure if your value is in plain text, don’t use WebUI.setEncryptedText()
hope this helps
I’ve tried this method but still this issue exists
You haven’t told us how your target web app is designed to behave.
You haven’t shared to us the HTML source code of your target web app.
You haven’t shown how your test case script is coded.
How can others in this forum say anything about your issue?
When you say you have tried “this method”, what do you mean? You cannot just use WebUI.setText(findTestObject(...), "your text") and then change it to WebUI.setEncryptedText(findTestObject(...), "your text")! That’s what @depapp was saying! It shouldn’t matter if you use “setText”, “sendKeys” or “setEncryptedText” as long as you use the method properly.
For either “setText” or “sendKeys”, you just enter your password in legible form, like “myPassw0rd”. If you use “setEncryptedText”, then you have to use Katalon’s encryption menu item to encrypt your password, and then use that encrypted mess as your text, like “@r$3I&p7$#”.
You can find the encryption menu item under, Help > Encrypt Text.
Obviously, you can use either “setText” or “sendKeys” on your username. And to verify your username was entered properly, you can also use:
import com.kms.katalon.core.model.FailureHandling as FailureHandling
WebUI.verifyElementVisible(findTestObject(...), FailureHandling.OPTIONAL)
WebUI.setText(findTestObject(...), "your username", FailureHandling.OPTIONAL)
WebUI.verifyElementAttributeValue(findTestObject(...), "value", "your username", 10, FailureHandling.OPTIONAL)
Edit: I also added a FailureHandling clause to each method so that it overrides your default FailureHandling setting if you should have it left at STOP_ON_FAILURE – this setting is found at:
Project > Settings > Test Design > Test Case.
more info like error logs/screenshot, code, katalon version required
Sure. I’m attching a screenshot for you reference. I’ve tried so many ways to resolve this but nothing works. So if you know any solution, provide me & I’ll try that to overcome the issue.
Sure. I’m attching a screenshot for you reference. I’ve tried so many ways to resolve this but nothing works. So if you know any solution, provide me & I’ll try that to overcome the issue.
What do you mean by saying “nothing works”?
What did you expect to see?
What did you actually see?
In order to understand you, we need you to analyze your issue for yourself a bit more.
Do you have dynamic <id> within your application or is your login page an <iframe>?
Dynamic <id> means your pathway will change every time the application is launched if you use the <id> as a reference (like “input_Email id_password”–this is a strange object name to use instead of just “input_password”). Obviously, if the pathway changes every time you launch your application, no objects will be found. There is a way to get around this, but you have to adjust your pathways to your objects and not just let the Web Spy do its thing. We can help you but we need to see your HTML for this or, at a minimum, the pathway that you are using.
Edit: also, with your code, you have already waited for your page to stabilize with your first “waitForElementVisible” (for your input_Email), so you shouldn’t need your second one, however, you can change the password’s “waitForElementVisible” to “verifyElementVisible” (Note there is no timeOut in “verifyElementVisible” so you have to remove the “10”)
Maybe like:
// 1. Open Browser & Navigate
WebUI.openBrowser('')
WebUI.navigateToUrl('https://...')
WebUI.waitForPageLoad(10)
// 2. Enter Login Email
WebUI.waitForElementVisible(findTestObject('.../Page_Log In - Profolo/input_Email'), 10)
WebUI.setText(findTestObject('.../Page_Log In - Profolo/input_Email'), '...')
WebUI.verifyElementAttributeValue(findTestObject('.../Page_Log In - Profolo/input_Email'), "value", '...', 10)
// 3. Enter Password
WebUI.verifyElementVisible(findTestObject('.../Page_Log In - Profolo/input_Email id_password'))
WebUI.setText(findTestObject('.../Page_Log In - Profolo/input_Email id_password'), '...')
WebUI.verifyElementAttributeValue(findTestObject('.../Page_Log In - Profolo/input_Email id_password'), "value", '...', 10)
// 4. Click Login
WebUI.verifyElementVisible(findTestObject('.../Page_Log In - Profolo/button_Login'))
WebUI.click(findTestObject('.../Page_Log In - Profolo/button_Login'))
WebUI.waitForPageLoad(10)
I just need to logged in successfully to access the application
What PART of the test script failed or didn’t seem to happen? Text was entered perfectly and the button was clicked but nothing happened on screen? If this was a bug report, what would you hope to see covered?
