ATF failing on Delete UI Action due to confirmation popup not handled

Khalid9030
Tera Contributor

Hi,

 

Issue:
I have a Delete UI Action in a scoped application that works perfectly when executed manually. When the user clicks the Delete button, a confirmation popup appears, and the record deletes only after clicking OK.

Problem in ATF:
When running ATF, the Delete step attempts to execute immediately. Even though I added a Click UI Component step in ATF to click the popup’s OK/Delete button, the test still fails with the following error:

 

【Summary】 

This step failed because the client error 'Table name cannot be null: java.lang.IllegalStateException: Table name cannot be null:   com.glide.db.TableDescriptor.<init>(TableDescriptor.java:90)
  com.glide.db.TableDescriptor.get(TableDescriptor.java:95)
  com.glide.data.access.ATable.getTableDescriptor(ATable.java:189)
  com.glide.script.GlideRecord.initTable(GlideRecord.java:11880)
  com.glide.script.GlideRecord.get(GlideRecord.java:2021)
  com.glide.quickactions.domain.ActionLoader.loadActions(ActionLoader.java:44)
  com.glide.quickactions.domain.ScriptableAction.jsStaticFunction_loadActions(ScriptableAction.java:45)
  java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
  java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.base/java.lang.reflect.Method.invoke(Method.java:569)
  org.mozilla.javascript.MemberBox.invoke(MemberBox.java:232)
  org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:692)
  org.mozilla.javascript.FunctionObject.call(FunctionObject.java:621)
  org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:3078)
  org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1721)
  org.mozilla.javascript.Interpreter.interpret(Interpreter.java:907)
  org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:137)
  com.glide.caller.gen.sys_script_include_b3fe0a72c30f42107b0f37977d01317e_script.call(Unknown Source)
  com.glide.script.ScriptCaller.call(ScriptCaller.java:22)
  org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:135)
  org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:3181)
  org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:3088)
  org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1721)
  org.mozilla.javascript.Interpreter.interpret(Interpreter.java:907)
  org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:137)
  com.glide.caller.gen.sys_script_include_b3fe0a72c30f42107b0f37977d01317e_script.call(Unknown Source)
  com.glide.script.ScriptCaller.call(ScriptCaller.java:22)
  org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:135)
  org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:3181)
  org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:3088)
  org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1721)
  org.mozilla.javascript.Interpreter.interpret(Interpreter.java:907)
  org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:137)
  com.glide.caller.gen.sys_script_include_aced508fc3801210f70e3ae605013181_script.call(Unknown Source)
  com.glide.script.ScriptCaller.call(ScriptCaller.java:22)
  org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:135)
  org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:3181)
  org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:3088)
  org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1721)
  org.mozilla.javascript.Interpreter.interpret(Interpreter.java:907)
  org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:137)
  com.glide.caller.gen.Phase_2_Jelly__ftp___gsft_database_sn_uxc_gen_ai_nowassist_context_menu_6.call(Unknown Source)
  com.glide.script.ScriptCaller.call(ScriptCaller.java:22)
  org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:135)
  org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:720)
  org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:4501)
  org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:151)
  com.glide.script.ScriptCompiler.executeAndPublishMetric(ScriptCompiler.java:78)
  com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:468)
  com.glide.script.ScriptEvaluator.evaluate(ScriptEvaluator.java:235)
  com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:384)
  com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:268)
  com.glide.ui.jelly.GlideJellyContext.evaluate(GlideJellyContext.java:596)
  com.glide.ui.jelly.tags.form.EvaluateTag.doTag(EvaluateTag.java:138)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
  org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
  com.glide.ui.jelly.tags.form.ScopeTag.doTag(ScopeTag.java:57)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
  com.glide.ui.jelly.tags.FileinfoTag2.doTag(FileinfoTag2.java:44)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
  org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
  com.glide.ui.jelly.tags.FileinfoTag2.doTag(FileinfoTag2.java:44)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
  org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:84)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
  org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
  com.glide.ui.jelly.tags.FileinfoTag2.doTag(FileinfoTag2.java:44)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
  org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:66)
  org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
  org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:66)
  org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
  org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
  com.glide.ui.jelly.tags.FileinfoTag2.doTag(FileinfoTag2.java:44)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
  org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:84)
  org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
  com.glide.ui.jelly.GlideJellyContext.run(GlideJellyContext.java:728)
  com.glide.ui.jelly.GlideJellyContext.executeCompiledScript(GlideJellyContext.java:967)
  com.glide.ui.jelly.GlideJellyContext.runScript(GlideJellyContext.java:809)
  com.glide.ui.jelly.GlideJellyContext.runScript(GlideJellyContext.java:767)
  com.glide.ui.GlideFormPhase2.generate(GlideFormPhase2.java:49)
  com.glide.ui.GlideForm.generatePopulatedForm(GlideForm.java:699)
  com.glide.ui.GlideForm.generatePopulatedForm(GlideForm.java:674)
  com.glide.ui.GlideForm.populateForm(GlideForm.java:666)
  com.glide.ui.GlideForm.getRenderedPage(GlideForm.java:252)
  com.glide.ui.NavigationTransaction.writeOutput(NavigationTransaction.java:160)
  com.glide.ui.NavigationTransaction.process(NavigationTransaction.java:131)
  com.glide.ui.GlideServletUITransaction.process(GlideServletUITransaction.java:170)
  com.glide.processors.AProcessor.runProcessor(AProcessor.java:785)
  com.glide.processors.AProcessor.processTransaction(AProcessor.java:328)
  com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:187)
  com.glide.processors.ProcessorRegistry.lambda$processWithRollbackRecording$0(ProcessorRegistry.java:413)
  com.glide.rollback.recording.RollbackRecorder.execute(RollbackRecorder.java:67)
  com.glide.processors.ProcessorRegistry.processWithRollbackRecording(ProcessorRegistry.java:409)
  com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:173)
  com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:58)
  com.glide.sys.Transaction.run(Transaction.java:3000)
  com.glide.ui.HTTPTransaction.run(HTTPTransaction.java:34)
  java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  java.base/java.lang.Thread.run(Thread.java:841)
' was detected on the page being tested. See failing Test Logs. To ignore these errors in the next test run, use 'Add all client errors to warning/ignored list' links.

13 REPLIES 13

Ankur Bawiskar
Tera Patron
Tera Patron

@Khalid9030 

share some screenshot how that confirmation popup is rendered?

is that a javascript confirmation box which comes using confirm()?

If yes then you can't test javascript alert/confirm/prompt using ATF. it's a known limitation.

ATF not supporting Pop-Up browser windows 

If it's some other UI page etc then you can try to use Custom UI Step

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 
Thanks for your reply.
I would also like to inform you that the same step is working as expected in another instance. Please find the popup window below. We are using the OOB Delete button in our scoped application.

@Khalid9030 

so please share the same step screenshot in the instance where it's working.

The error says table name cannot be empty

please share list of steps you configured.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 
Please find attachment.