Two questions…
-
Is there a “How Stuff Works” doc for Windows Elements and Windows Test Objects? Some sort of internals documentation? I’ve been trying little code samples of every make and model, but I feel like I don’t know what’s going on under the covers, and thats the real problem.
-
Why isn’t this working?

I have a Windows app with nesteed tree lists. I have managed to get code that will navitgate down three levels of treelists. It also SUCCESSFULLY does a right-click on the bottom treelist element, chooses an option (“Export”), clicks “Save”, then moves on to the next treelist item.
It’s worked for hundreds of entries.
HOWEVER, I need to do two things: the “right-click” above works. But also I need to click on a menu item, choose “Print → Print to PDF”, and click “Save”.
The steps are virtually identical between the export and the print except one is a right-click, the other is a click. My guess is that the difference is that even though the right-click opens a dialog, it does so WITHIN the context of the main Window. The dialog for the print looks no different, but my sense is that it is a new context.
At any rate, the right-click works again and again. The “click” works one and a half times.
The steps are:
- Click on treelist item B.
- Tap up-arrow to move focus to the previous item (e.g., treelist item A)
- Double-click on the treelist item B (this opens the list of children
- findElements to retrieve the children
- Click on treelist item B.1… rinse, repeat
THIS PART WORKS.
It works fine for the right click (export), and it works one and half times on the menu click (print).
That is, even after I get a dialog and click save, the program SUCCESSFULLY goes back to the main window, clicks on the next item, expands it if thats where it is, and then tries to print it.
HOWEVER, the second time, it no longer remembers the object it used to start the print process just seconds before.
I have a tried lots of things, like findWindowsObject, findElement, switchWindows, combinations, different orders… nothing.
I would think it was a focus issue, except it REMEMBERS the treelist items, and is able to continue processing the tree AFTER the print.
It just can’t print a second time.
I feel llike I’m missing something. I was careful to preserve the Windows Test Object in the top level scope, and thats what it uses the first time.
Now here’s my suspicion - the thing I’m clicking on… its a button. No text on it. When I look at the Windows Test Object, its miserably empty:
<?xml version="1.0" encoding="UTF-8"?>
<WindowsElementEntity>
<description></description>
<name>Menu - External action drop-down menu</name>
<tag></tag>
<locator>/Window/Custom[1]/Tab[1]/Menu[1]</locator>
<locatorStrategy>XPATH</locatorStrategy>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>ElementIndex</name>
<type>Main</type>
<value>1</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>RuntimeId</name>
<type>Main</type>
<value>7,5620,49997107</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>ItemStatus</name>
<type>Main</type>
<value></value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>IsRequiredForForm</name>
<type>Main</type>
<value>False</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>FrameworkId</name>
<type>Main</type>
<value>WPF</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>Orientation</name>
<type>Main</type>
<value>None</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>IsOffscreen</name>
<type>Main</type>
<value>False</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>ProcessId</name>
<type>Main</type>
<value>5620</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>NativeWindowHandle</name>
<type>Main</type>
<value>0</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>ClassName</name>
<type>Main</type>
<value>RibbonApplicationMenu</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>ItemType</name>
<type>Main</type>
<value></value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>AutomationId</name>
<type>Main</type>
<value>appMenu</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>IsContentElement</name>
<type>Main</type>
<value>False</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>IsControlElement</name>
<type>Main</type>
<value>True</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>HelpText</name>
<type>Main</type>
<value>Click here to run various connection-related commands such as create, save, print and export.</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>BoundingRectangle</name>
<type>Main</type>
<value>943,130,56,23</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>IsEnabled</name>
<type>Main</type>
<value>True</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>IsKeyboardFocusable</name>
<type>Main</type>
<value>True</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>HasKeyboardFocus</name>
<type>Main</type>
<value>False</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>AccessKey</name>
<type>Main</type>
<value>F</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>AcceleratorKey</name>
<type>Main</type>
<value></value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>Name</name>
<type>Main</type>
<value></value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>LocalizedControlType</name>
<type>Main</type>
<value>menu</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>IsPassword</name>
<type>Main</type>
<value>False</value>
</properties>
<properties>
<isSelected>false</isSelected>
<matchCondition>equals</matchCondition>
<name>XPath</name>
<type>Main</type>
<value>/Window/Custom[1]/Tab[1]/Menu[1]</value>
</properties>
</WindowsElementEntity>
Here is the code that is repeated one and a half times (with much validation and comments removed)…
WindowsTestObject printMenuTO = findWindowsObject('Export to PDF dialog 2020-01-05/Menu - External action drop-down menu')
for... {
for... {
for... {
experimentNameTO.setLocatorStrategy(WindowsTestObject.LocatorStrategy.NAME)
experimentNameTO.setLocator(experimentName)
Windows.findElement(experimentNameTO)
assert experimentNameTO != null
'Click treeitem'
Windows.click(experimentNameTO)
'Up-arrow'
Windows.sendKeys(experimentNameTO, Keys.chord(Keys.ARROW_UP))
'Click treeitem again'
Windows.click(experimentNameTO)
'Is it really there?'
WebElement foundElement = Windows.findElement(printMenuTO)
assert foundElement != null
'Click on Print...'
Windows.click(findWindowsObject('Object Repository/Export to PDF dialog 2020-01-05/MenuItem'))
'Click on Print as PDF...'
Windows.click(findWindowsObject('Object Repository/Export to PDF dialog 2020-01-05/MenuItem(1)'))
'Click "Save" button to confirm Print to PDF action'
Windows.setText(findWindowsObject('Export to PDF dialog 2020-01-05/Button(1) - Save button in Export to PDF file save dialog'),
'Save')
}
}
}
And here’s the console output:
2021-01-29 14:10:02.458 DEBUG testcase.fullexport2_pdf - 8: println("Experiment " + sprintf("%3d", experiment_cnt) + ": " + notebookName + " : " + experimentName + " - " + experiment.getTagName())
Experiment 1: Untitled Chemistry Notebook : Untitled Chemistry Notebook-001 - ControlType.TreeItem
2021-01-29 14:10:02.934 DEBUG testcase.fullexport2_pdf - 9: outputFile.append(sprintf("%-12s - %-25s - %-30s - %3d - %-30s
", foundProfessor, studentName, notebookName, experiment_cnt, experimentName))
2021-01-29 14:10:02.938 DEBUG testcase.fullexport2_pdf - 10: println("Web element:
" + experiment + "
" + experiment.toString())
Web element:
[[[[io.appium.java_client.windows.WindowsDriver, Capabilities: {appTopLevelWindow=3005c0, javascriptEnabled=true, platform=WINDOWS, platformName=WINDOWS}] -> name: Untitled Chemistry Notebook]] -> xpath: */*]
[[[[io.appium.java_client.windows.WindowsDriver, Capabilities: {appTopLevelWindow=3005c0, javascriptEnabled=true, platform=WINDOWS, platformName=WINDOWS}] -> name: Untitled Chemistry Notebook]] -> xpath: */*]
2021-01-29 14:10:02.938 DEBUG testcase.fullexport2_pdf - 11: experimentNameTO.setLocatorStrategy(NAME)
2021-01-29 14:10:02.938 DEBUG testcase.fullexport2_pdf - 12: experimentNameTO.setLocator(experimentName)
2021-01-29 14:10:02.938 DEBUG testcase.fullexport2_pdf - 13: findElement(experimentNameTO)
2021-01-29 14:10:05.424 DEBUG testcase.fullexport2_pdf - 14: assert experimentNameTO != null
2021-01-29 14:10:05.426 DEBUG testcase.fullexport2_pdf - 15: println("Click on experiment " + experimentNameTO.getLocator())
Click on experiment Untitled Chemistry Notebook-001
2021-01-29 14:10:05.428 DEBUG testcase.fullexport2_pdf - 16: click(experimentNameTO)
2021-01-29 14:10:07.686 INFO c.k.k.c.w.k.helper.WindowsActionHelper - Clicking on element: null
2021-01-29 14:10:07.931 DEBUG testcase.fullexport2_pdf - 17: sendKeys(experimentNameTO, Keys.chord(ARROW_UP))
2021-01-29 14:10:12.285 DEBUG testcase.fullexport2_pdf - 18: println("Click on experiment " + experimentNameTO.getLocator())
Click on experiment Untitled Chemistry Notebook-001
2021-01-29 14:10:12.286 DEBUG testcase.fullexport2_pdf - 19: click(experimentNameTO)
2021-01-29 14:10:15.063 INFO c.k.k.c.w.k.helper.WindowsActionHelper - Clicking on element: null
2021-01-29 14:10:15.866 DEBUG testcase.fullexport2_pdf - 20: fileName = sprintf("%s_%s_%s_%s.PDF", professorName, studentName, notebookName, experimentName)
2021-01-29 14:10:15.867 DEBUG testcase.fullexport2_pdf - 21: fileName = fileName.replaceAll(",", "")
2021-01-29 14:10:15.871 DEBUG testcase.fullexport2_pdf - 22: comment("Place RENAME command in log for " + experimentName)
2021-01-29 14:10:15.876 INFO c.k.k.c.keyword.builtin.CommentKeyword - Place RENAME command in log for Untitled Chemistry Notebook-001
2021-01-29 14:10:15.876 DEBUG testcase.fullexport2_pdf - 23: println("RENAME "" + experimentName + ".PDF" "" + fileName + """)
RENAME "Untitled Chemistry Notebook-001.PDF" "BETLEY_Eames Emily_Untitled Chemistry Notebook_Untitled Chemistry Notebook-001.PDF"
2021-01-29 14:10:15.877 DEBUG testcase.fullexport2_pdf - 24: comment("Set locator strategy for External action menu (print function)")
2021-01-29 14:10:15.879 INFO c.k.k.c.keyword.builtin.CommentKeyword - Set locator strategy for External action menu (print function)
2021-01-29 14:10:15.879 DEBUG testcase.fullexport2_pdf - 25: println("External action menu locator strategy: " + printMenuTO.getLocatorStrategy())
External action menu locator strategy: XPATH
2021-01-29 14:10:15.879 DEBUG testcase.fullexport2_pdf - 26: comment("Display locator for External action menu (print function)")
2021-01-29 14:10:15.879 INFO c.k.k.c.keyword.builtin.CommentKeyword - Display locator for External action menu (print function)
2021-01-29 14:10:15.879 DEBUG testcase.fullexport2_pdf - 27: println("External action menu locator: " + printMenuTO.getLocator())
External action menu locator: /Window/Custom[1]/Tab[1]/Menu[1]
2021-01-29 14:10:15.879 DEBUG testcase.fullexport2_pdf - 28: comment("Insure the External action menu can be located")
2021-01-29 14:10:15.879 INFO c.k.k.c.keyword.builtin.CommentKeyword - Insure the External action menu can be located
2021-01-29 14:10:15.879 DEBUG testcase.fullexport2_pdf - 29: foundElement = findElement(printMenuTO)
2021-01-29 14:10:27.206 DEBUG testcase.fullexport2_pdf - 30: assert foundElement != null
2021-01-29 14:10:27.207 DEBUG testcase.fullexport2_pdf - 31: comment("Display foundElement")
2021-01-29 14:10:27.208 INFO c.k.k.c.keyword.builtin.CommentKeyword - Display foundElement
2021-01-29 14:10:27.214 DEBUG testcase.fullexport2_pdf - 32: println("Found element: " + foundElement.toString())
Found element: [[io.appium.java_client.windows.WindowsDriver, Capabilities: {appTopLevelWindow=3005c0, javascriptEnabled=true, platform=WINDOWS, platformName=WINDOWS}] -> xpath: /Window/Custom[1]/Tab[1]/Menu[1]]
2021-01-29 14:10:27.215 DEBUG testcase.fullexport2_pdf - 33: comment("Click on external actions dropdown menu at top")
2021-01-29 14:10:27.216 INFO c.k.k.c.keyword.builtin.CommentKeyword - Click on external actions dropdown menu at top
2021-01-29 14:10:27.216 DEBUG testcase.fullexport2_pdf - 34: click(printMenuTO)
2021-01-29 14:10:37.613 INFO c.k.k.c.w.k.helper.WindowsActionHelper - Clicking on element: Object Repository/Export to PDF dialog 2020-01-05/Menu - External action drop-down menu
2021-01-29 14:10:37.880 DEBUG testcase.fullexport2_pdf - 35: comment("Click on Print...")
2021-01-29 14:10:37.884 INFO c.k.k.c.keyword.builtin.CommentKeyword - Click on Print...
2021-01-29 14:10:37.885 DEBUG testcase.fullexport2_pdf - 36: click(findWindowsObject("Object Repository/Export to PDF dialog 2020-01-05/MenuItem"))
2021-01-29 14:10:47.122 INFO c.k.k.c.w.k.helper.WindowsActionHelper - Clicking on element: Object Repository/Export to PDF dialog 2020-01-05/MenuItem
2021-01-29 14:10:47.402 DEBUG testcase.fullexport2_pdf - 37: comment("Click on Print as PDF...")
2021-01-29 14:10:47.405 INFO c.k.k.c.keyword.builtin.CommentKeyword - Click on Print as PDF...
2021-01-29 14:10:47.406 DEBUG testcase.fullexport2_pdf - 38: click(findWindowsObject("Object Repository/Export to PDF dialog 2020-01-05/MenuItem(1)"))
2021-01-29 14:10:57.291 INFO c.k.k.c.w.k.helper.WindowsActionHelper - Clicking on element: Object Repository/Export to PDF dialog 2020-01-05/MenuItem(1)
2021-01-29 14:10:57.545 DEBUG testcase.fullexport2_pdf - 39: comment("Click "Save" button to confirm Print to PDF action")
2021-01-29 14:10:57.546 INFO c.k.k.c.keyword.builtin.CommentKeyword - Click "Save" button to confirm Print to PDF action
2021-01-29 14:10:57.546 DEBUG testcase.fullexport2_pdf - 40: setText(findWindowsObject("Export to PDF dialog 2020-01-05/Button(1) - Save button in Export to PDF file save dialog"), "Save")
2021-01-29 14:11:44.079 DEBUG testcase.fullexport2_pdf - 41: comment("Wait 20 seconds for save to complete")
2021-01-29 14:11:44.086 INFO c.k.k.c.keyword.builtin.CommentKeyword - Wait 20 seconds for save to complete
2021-01-29 14:11:44.087 DEBUG testcase.fullexport2_pdf - 42: delay(26)
2021-01-29 14:12:10.091 DEBUG testcase.fullexport2_pdf - 43: comment("Reset last_ex_TO")
2021-01-29 14:12:10.095 INFO c.k.k.c.keyword.builtin.CommentKeyword - Reset last_ex_TO
2021-01-29 14:12:10.095 DEBUG testcase.fullexport2_pdf - 44: copyWTO(last_ex_TO, experimentNameTO)
2021-01-29 14:12:10.095 DEBUG testcase.fullexport2_pdf - 1: println("toWTO <- fromWTO : " + toWTO.getLocator() + " <- " + fromWTO.getLocator())
toWTO <- fromWTO : Untitled Chemistry Notebook <- Untitled Chemistry Notebook-001
2021-01-29 14:12:10.095 DEBUG testcase.fullexport2_pdf - 2: toWTO.setLocatorStrategy(fromWTO.getLocatorStrategy())
2021-01-29 14:12:10.095 DEBUG testcase.fullexport2_pdf - 3: toWTO.setLocator(fromWTO.getLocator())
2021-01-29 14:12:10.095 DEBUG testcase.fullexport2_pdf - 45: experimentNameOld = experimentName
2021-01-29 14:12:10.095 DEBUG testcase.fullexport2_pdf - 46: comment("Exit Loop")
2021-01-29 14:12:10.102 INFO c.k.k.c.keyword.builtin.CommentKeyword - Exit Loop
2021-01-29 14:12:10.102 DEBUG testcase.fullexport2_pdf - 1: if (experiment.getTagName() != "ControlType.TreeItem")
2021-01-29 14:12:10.127 DEBUG testcase.fullexport2_pdf - 2: if (experiment.getText() == "Offline")
2021-01-29 14:12:10.168 DEBUG testcase.fullexport2_pdf - 3: if (experiment.getText() == "Offline 2")
2021-01-29 14:12:10.199 DEBUG testcase.fullexport2_pdf - 4: if (experiment.getText() == "User Configuration")
2021-01-29 14:12:10.233 DEBUG testcase.fullexport2_pdf - 5: if (experiment.getText() == "User Configuration 2")
2021-01-29 14:12:10.268 DEBUG testcase.fullexport2_pdf - 6: (experiment_cnt++)
2021-01-29 14:12:10.268 DEBUG testcase.fullexport2_pdf - 7: experimentName = experiment.getText()
2021-01-29 14:12:10.307 DEBUG testcase.fullexport2_pdf - 8: println("Experiment " + sprintf("%3d", experiment_cnt) + ": " + notebookName + " : " + experimentName + " - " + experiment.getTagName())
Experiment 2: Untitled Chemistry Notebook : Untitled Chemistry Notebook-002 - ControlType.TreeItem
2021-01-29 14:12:10.347 DEBUG testcase.fullexport2_pdf - 9: outputFile.append(sprintf("%-12s - %-25s - %-30s - %3d - %-30s
", foundProfessor, studentName, notebookName, experiment_cnt, experimentName))
2021-01-29 14:12:10.349 DEBUG testcase.fullexport2_pdf - 10: println("Web element:
" + experiment + "
" + experiment.toString())
Web element:
[[[[io.appium.java_client.windows.WindowsDriver, Capabilities: {appTopLevelWindow=3005c0, javascriptEnabled=true, platform=WINDOWS, platformName=WINDOWS}] -> name: Untitled Chemistry Notebook]] -> xpath: */*]
[[[[io.appium.java_client.windows.WindowsDriver, Capabilities: {appTopLevelWindow=3005c0, javascriptEnabled=true, platform=WINDOWS, platformName=WINDOWS}] -> name: Untitled Chemistry Notebook]] -> xpath: */*]
2021-01-29 14:12:10.349 DEBUG testcase.fullexport2_pdf - 11: experimentNameTO.setLocatorStrategy(NAME)
2021-01-29 14:12:10.349 DEBUG testcase.fullexport2_pdf - 12: experimentNameTO.setLocator(experimentName)
2021-01-29 14:12:10.349 DEBUG testcase.fullexport2_pdf - 13: findElement(experimentNameTO)
2021-01-29 14:12:12.139 DEBUG testcase.fullexport2_pdf - 14: assert experimentNameTO != null
2021-01-29 14:12:12.140 DEBUG testcase.fullexport2_pdf - 15: println("Click on experiment " + experimentNameTO.getLocator())
Click on experiment Untitled Chemistry Notebook-002
2021-01-29 14:12:12.142 DEBUG testcase.fullexport2_pdf - 16: click(experimentNameTO)
2021-01-29 14:12:13.756 INFO c.k.k.c.w.k.helper.WindowsActionHelper - Clicking on element: null
2021-01-29 14:12:14.066 DEBUG testcase.fullexport2_pdf - 17: sendKeys(experimentNameTO, Keys.chord(ARROW_UP))
2021-01-29 14:12:19.381 DEBUG testcase.fullexport2_pdf - 18: println("Click on experiment " + experimentNameTO.getLocator())
Click on experiment Untitled Chemistry Notebook-002
2021-01-29 14:12:19.382 DEBUG testcase.fullexport2_pdf - 19: click(experimentNameTO)
2021-01-29 14:12:22.002 INFO c.k.k.c.w.k.helper.WindowsActionHelper - Clicking on element: null
2021-01-29 14:12:22.824 DEBUG testcase.fullexport2_pdf - 20: fileName = sprintf("%s_%s_%s_%s.PDF", professorName, studentName, notebookName, experimentName)
2021-01-29 14:12:22.825 DEBUG testcase.fullexport2_pdf - 21: fileName = fileName.replaceAll(",", "")
2021-01-29 14:12:22.826 DEBUG testcase.fullexport2_pdf - 22: comment("Place RENAME command in log for " + experimentName)
2021-01-29 14:12:22.830 INFO c.k.k.c.keyword.builtin.CommentKeyword - Place RENAME command in log for Untitled Chemistry Notebook-002
2021-01-29 14:12:22.831 DEBUG testcase.fullexport2_pdf - 23: println("RENAME "" + experimentName + ".PDF" "" + fileName + """)
RENAME "Untitled Chemistry Notebook-002.PDF" "BETLEY_Eames Emily_Untitled Chemistry Notebook_Untitled Chemistry Notebook-002.PDF"
2021-01-29 14:12:22.832 DEBUG testcase.fullexport2_pdf - 24: comment("Set locator strategy for External action menu (print function)")
2021-01-29 14:12:22.834 INFO c.k.k.c.keyword.builtin.CommentKeyword - Set locator strategy for External action menu (print function)
2021-01-29 14:12:22.835 DEBUG testcase.fullexport2_pdf - 25: println("External action menu locator strategy: " + printMenuTO.getLocatorStrategy())
External action menu locator strategy: XPATH
2021-01-29 14:12:22.836 DEBUG testcase.fullexport2_pdf - 26: comment("Display locator for External action menu (print function)")
2021-01-29 14:12:22.838 INFO c.k.k.c.keyword.builtin.CommentKeyword - Display locator for External action menu (print function)
2021-01-29 14:12:22.838 DEBUG testcase.fullexport2_pdf - 27: println("External action menu locator: " + printMenuTO.getLocator())
External action menu locator: /Window/Custom[1]/Tab[1]/Menu[1]
2021-01-29 14:12:22.839 DEBUG testcase.fullexport2_pdf - 28: comment("Insure the External action menu can be located")
2021-01-29 14:12:22.841 INFO c.k.k.c.keyword.builtin.CommentKeyword - Insure the External action menu can be located
2021-01-29 14:12:22.842 DEBUG testcase.fullexport2_pdf - 29: foundElement = findElement(printMenuTO)
2021-01-29 14:13:23.900 ERROR c.k.k.core.keyword.internal.KeywordMain - ❌ Expected condition failed: waiting for com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper$1@4aa11206 (tried for 60 second(s) with 50 milliseconds interval) (Root cause: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper$1@4aa11206 (tried for 60 second(s) with 50 milliseconds interval)
at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:304)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper.findElement(WindowsActionHelper.java:120)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper.findElement(WindowsActionHelper.java:77)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper.findElement(WindowsActionHelper.java:69)
at com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper$findElement$1.call(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.FindElementKeyword$_findElement_closure1.doCall(FindElementKeyword.groovy:47)
at com.kms.katalon.core.windows.keyword.builtin.FindElementKeyword$_findElement_closure1.doCall(FindElementKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:77)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.FindElementKeyword.findElement(FindElementKeyword.groovy:37)
at com.kms.katalon.core.windows.keyword.builtin.FindElementKeyword$findElement.callCurrent(Unknown Source)
at com.kms.katalon.core.windows.keyword.builtin.FindElementKeyword.execute(FindElementKeyword.groovy:32)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords.findElement(WindowsBuiltinKeywords.java:718)
at com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords$findElement$3.call(Unknown Source)
at fullexport2_pdf.run(fullexport2_pdf:458)
Note that I tried to use this:
'Insure focus goes to correct Window'
Windows.switchToWindow(experimentNameTO)
That’s the object I am successfully able to click on. However that switch statement returned the message:
Unable to create a new remote session.
There was another post in the forum for that message, but in the mobile section. I keep going back to “I don’t need to switch windows because I am already successfully clicking in the one I need to use”. Also, that thread dried up last March with no conclusion.
So, back to my original question, I can’t understand why I can’t reuse a Windows Test Object (well, I do understand - as the self repairing docs say, these objects are fragile). But it seems to dissappear without a trace, and I can’t figure out a way to find it again!
ANY and ALL suggestions, no matter how obvious they may seem to you, are welcome.
Thanks!
Jim


