Cannot take screenshot during running a test case

It would also be good to know if the same test fails in Chrome. I don’t see any reason why it would, but it’s an easy enough thing to check.

1 Like

Hello Brandon and Russ,
It is working
Thanks a lot for both of you
Have a wonderful weekend

2 Likes

Out of curiosity, what was the solution? It would be good to know for future reference :slightly_smiling_face:

Edit: I see you put a delay in before setting EITHER field. While it’s good that that works for now, you would ideally create a custom wait condition for this. Also, you should mark @Russ_Thomas’s answer as the solution.

Hi Brandon,
my URL during the recording time is https://sait-sust-non-dev1-ban-ss-ssag2.sait.ca/applicationNavigator
but when I run the test I found out this URL changed to

https://sait-sust-non-dev1-ban-idm-wso2.sait.ca/authenticationendpoint/login.do?commonAuthCallerPath=%2Fcas-web%2Flogin&forceAuth=false&passiveAuth=false&tenantDomain=carbon.super&sessionDataKey=c8a06a27-1121-4a46-b058-476797e113d3&relyingParty=BannerApplicationNavigator2&type=cassso&sp=BannerApplicationNavigator2&isSaaSApp=false&authenticators=BasicAuthenticator:LOCAL

(I do not know why this happened and how it happened) by editing the Navigate to URL step in the test case to the one, it works fine till now. I am going to test this more and I will keep you updated

1 Like

Thank you, I would appreciate it. :grin:

Agreed. And I’d like to know what we allowed by waiting… I’d like to see the content of the event handler.

Please, Ahmed, help us understand (we don’t like fixing code by osmosis or voodoo!)

I have been following this topic and would like to know what is the behaviour on Google Chrome

with the URL https://sait-sust-non-dev1-ban-ss-ssag2.sait.ca/applicationNavigator and with no delay

I don’t see Ahmed trying Brandon’s post

Edit : I have so many situations where a Test Case will fail in Firefox but pass in Chrome

Let’s be clear, whatever browser you use, asking webdriver to target a control immediately after a navigation attempt is foolish at best.

Admittedly, the five second delay is less than ideal:

… as I implied, it wasn’t meant to stay like that.

Let’s see if Ahmed comes back. Then we can shape up a real solution.

Hello all,
First thanks a lot for you all for your help and support
Just to let all know, Without using delay, the test case works successfully on both FF and Chrome once I corrected the URL after the recording.

Thanks a lot for your help and support, I really appreciate

1 Like

here is the test case now:

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import com.kms.katalon.util.CryptoUtil as CryptoUtil

WebUI.openBrowser(’’)

WebUI.navigateToUrl(‘https://sait-sust-non-dev1-ban-ss-ssag2.sait.ca/applicationNavigator’)

//WebUI.delay(5)

WebUI.setText(findTestObject(‘Object Repository/folder10/input_User Name_username’), ‘ff_as’)

WebUI.setEncryptedText(findTestObject(‘Object Repository/folder10/input_Password_password’), ‘vhY2RXFFBgI=’)

//CryptoUtil.CrytoInfo cryptoInfo = CryptoUtil.getDefault(‘vhY2RXFFBgI=’)
//String rawText = CryptoUtil.decode(cryptoInfo)
//WebUI.sendKeys(findTestObject(‘Object Repository/folder10/input_Password_password’), rawText)
WebUI.click(findTestObject(‘Object Repository/folder10/input_Password_btn btn-default hidden-xs’))

WebUI.setText(findTestObject(‘Object Repository/folder10/input_Welcome_search’), ‘apacons’)

WebUI.sendKeys(findTestObject(‘Object Repository/folder10/input_Welcome_search’), Keys.chord(Keys.ENTER))

WebUI.closeBrowser()

Thanks for reporting back :grin: Please mark your above post as the solution, so that others reading this are not confused.