I am new to Katalon and trying to test Salesforce. I run a test case record and successfully login to my Salesforce Org. However Salesforce displays a popup with Show notications, Allow, Block and I click on Block. Katalon does not record this action. What do you do if Katalon does not record selection in a popup?
If I Run the test case I get a failure:
=============== ROOT CAUSE =====================
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Flows Salesforce/div_View profile_slds-r4’ located by ‘//div[@id=‘457:83;a’]/div/div[4]’ not found
Thanks. I have tested this problem without the Katalon test case and the pop-up does not occur. It only occurs when I run the test case in Katalon. So I know the problem is with your software.
I would be happy to share my screen and show someone the error.
Richard Case
925 389 1991 rhcase@pspenterprises.com
I really like Katalon and hope we can get past this problem.
Can you do us a favour and restart your application and then go back to the object that you “spied” on to get the pathway quoted above? Use the Spy again on this object. Did you get the same pathway, especially with the <id> attribute, or did you get a different one?
If you got a different one, then you have dynamic attributes. That means the attribute changes every time you start the application. To get around this, you have to review the HTML and review other attributes that may be stable or use functions, like “contains”, to use only stable parts of the dynamic attributes. We can assist you, but we would need to see the HTML of the objects in question.
Here is an example of creating pathways to dynamic attributes:
Edit: Katalon Team (@support.squad) has put together several posts to assist in using Katalon with Salesforce. You should review them as well.
Review these other Posts on dynamic pop-ups to help you move past it.
To assist you on getting the pathways for the button object(s), stop your recording and use the F12 key and then select, “Open DevTools”. Then use the first icon on the top area of Dev Tools to select your objects. You may have to create the pathway to the button you want, but if you show the HTML, we can assist.
Mike, I am very new to Katalon. If I run my application directly I do not see the pop-up. If I run it via Katalon, I see the popup. It is a bug in your system.
I cannot change the HTML of Salesforce.
I am happy to have a zoom call and show this to you.
Please view the attached video to see this happen.
try to use robot script for manual key press of ESC or Enter key which might fix your problem
//Create object of Robot class
Robot robot = new Robot();
//Code to Enter D1.txt
//Press Shify key
robot.keyPress(KeyEvent.VK_SHIFT);
//Press d , it gets typed as upper case D as Shift key is pressed
robot.keyPress(KeyEvent.VK_D);
//Release SHIFT key to release upper case effect
robot.keyRelease(KeyEvent.VK_SHIFT);
//Press ENTER to close the popup
robot.keyPress(KeyEvent.VK_ENTER);