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

@Khalid9030 

in your current instance where it's failing are you able to open the record and click on UI action?

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

Shaqeel
Mega Sage

Hi @Khalid9030 

 

Kindly use click Modal button to click OK.

You can also add this error to ignored list and run.

 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

@Shaqeel  & @Ankur Bawiskar 
Thanks for your reply. 

I want to know the major difference between 'Click Model button' and 'Click Component (Custom UI)' 

 

@Shaqeel  & @Ankur Bawiskar 

Thanks for your reply 🙂

I believe the issue this time was not related to clicking a button on a pop-up screen. Instead, when running ATF, the record was deleted directly by clicking the Delete button on the form screen.

I suspect that the Click Component step failed because the record was deleted directly, bypassing the confirmation pop-up. I would like to understand why deleting a record via the Delete button bypasses the confirmation pop-up in ATF. Additionally, if I use the Click Model button instead of the Click UI Component step, would this resolve the issue? Please provide your comments.



@Khalid9030 

That could be the case.

I haven't tried that.

Click Model -> mostly for UI pages

Click Component Custom UI  -> for custom components, widgets html etc

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