I have a test scenario in which i have to click on a print icon in a web page. A new window will appear for printing. However I dont want to perform actual printing, i want to close the newly opened print window. After closing only I will be able to work on the initial page. I have tried switch to window index, close window index, but its not closing the print page. I have tried Alert option also, but that too didnt work. Pages are as showed below.
Here are the codes I tried:
2019-03-11 16:30:27.293 e[39mDEBUGe[0;39m e[36mtestcase.Test case 11,12,13,14,15,16,17 -e[0;39m e[39m23: switchToWindowIndex(1)e[0;39m
2019-03-11 16:30:27.350 e[39mDEBUGe[0;39m e[36mtestcase.Test case 11,12,13,14,15,16,17 -e[0;39m e[39m24: closeWindowIndex(1)e[0;39m
2019-03-11 16:30:48.787 e[1;31mERRORe[0;39m e[36mc.k.k.core.keyword.internal.KeywordMain -e[0;39m e[31m❌ Unable to close window with index 1e[0;39m
2019-03-11 16:30:48.797 e[1;31mERRORe[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[31m❌ closeWindowIndex(1) FAILED.e[0;39m