So I found a way to make the recording work. The problem seems related to the repository - in the case where it doesn't work, I created a large repository by choosing the top level item (streams explorer) and adding it with children. In the case where it does work, I created a very small repository by choosing only the element that I'm interested in (TreeItemField_Processors1), and adding it.
The resulting repository in both cases is a rather different path to the end element (which is the same), and seems to be the difference between this step finding the element or not based on the size of the window.
The recording that doesn't work:
Code: Select all
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
Report.Info("Mouse Left Click item 'FormSTREAMS_Explorer.ContainerContentPanel1.TreeItemField_Processors' at Center.");
repo.FormSTREAMS_Explorer.ContainerContentPanel1.TreeItemField_Processors.Click();
Delay.Milliseconds(2880);
The repository paths
FormSTREAMS_Explorer:
Code: Select all
/form[@controlname='MainForm' and @title='STREAMS Explorer']
ContainerContentPanel1:
Code: Select all
container/container[@controlname='contentPanel']
TreeItemField_Processors:
Code: Select all
container/container/container[@caption='' and @controltypename='SplitterPanel' and @instance='0']/container/container[@caption='' and @controltypename='SplitterPanel' and @instance='0']/container[@controlname='PanelContainer']/container/container/container[@controlname='pnlContent']/container/tree/treeitem[@accessiblename='Field Processors']
The recording that works:
Code: Select all
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
Report.Info("Mouse Left Click item 'FormSTREAMS_Explorer.TreeItemField_Processors1' at Center.");
repo.FormSTREAMS_Explorer.TreeItemField_Processors1.Click();
Delay.Milliseconds(700);
The repository paths
FormSTREAMS_Explorer:
TreeItemField_Processors1:
Code: Select all
container/container[@controlname='contentPanel']/container/container/container[@caption='' and @controltypename='SplitterPanel' and @instance='0']/container/container[@caption='' and @controltypename='SplitterPanel' and @instance='0']/container[@controlname='PanelContainer']/container/container/container[@controlname='pnlContent']/container/tree/tree/treeitem[@accessiblename='Field Processors']