Hi,
I’m recording a test with a save button. After the button is clicked the page posts data and the response contains javascript with an alert.
In the test recording I click the button and click OK on the alert. The recorder records the button click and “assertAlert” with the alert text as target.
When I play the test the assertAlert gets yellow and does not find the alert. Later it breaks with timeout.
Thanks for the post. I have the same issue, as Katalon Studio Web Spy or Object Spy is not able to capture a simple JavaScript - alert event, to let me do proper web test automation or even load-testing with this tool. I am stock here and all forum does not mention how to handle this type of situations.
Interestingly, a lot of Katalon tutorials, talks about simple web automation, but in real web-testing scenarios, is not able to do that!
I am really shocked and could not find any help there.
Are you guys using Katalon Recorder or our Object Spy? By the way , you can’t capture any alert popup from your web application, and you have to handle it manually by using some Alert keywords such as ‘Accept Alert’ or ‘Dismiss Alert’.
Are you guys using Katalon Recorder or our Object Spy? By the way , you can’t capture any alert popup from your web application, and you have to handle it manually by using some Alert keywords such as ‘Accept Alert’ or ‘Dismiss Alert’.
As I said in the first post the “assertAlert” command does not work. Other Commands like “acceptAlert” do also not work.
First, AFAICT, acceptAlert is not available in Katalon Recorder, so don’t bother trying it.
I have never managed to get a replay of assertAlert to work, it always complains the text is wrong (even when it is perfectly correct). So until KMS fix it, I am taking those out. Do you NEED to check the text? If not, just take the step out, and do this:
Sorry for leaving out the description :). That sample test suite demos “assertAlert” command. If it does not work on your machines, I will investigate further.
Alex - I exported the test and pasted it into Katalon Studio, same result, the alert() never appears.
I added WebUI.delay(5) after the click and before the assert: I see the button highlighted like it has been clicked but the alert dialog still does not appear.
The test says it passed. As a functional test, this is not valid.
The speed is fine on my machine. Could you please tell me how slow it is and for which steps?
Also, the call to alert() JavaScript function was overwritten by KR. That’s the way KR extracts the alert messages and do verification/assertion steps. That’s why you didn’t see the alert box. But the assertion was really done. You can verify by changing the text in the command and the step will fail. Also, if you add assertAlert to a test case with no alert(), KR will wait 30 seconds and mark that test case as failed.
@devalex88 or @Russ_Thomas
Could you please provide more detailed info on the accept javascript alert that has been talked about here.
We are facing an issue where a popup appears stating that the javascript is blocked midway during the execution.
As we execute on a headless browser with linux OS not sure what is the best solution to go ahead here to pass through this.