Refreshing repository in C# during execution
Posted: Fri Jun 17, 2016 1:32 pm
Hi there.
I'm looking for a way to refresh the repository during test execution.
The reason is this:
I have a checkbox listed in the repository, which can never be found during execution. Once I abort execution and open the spy through the repository however, the element can be found and the 'highlight' option highlights the element without any problems.
The reason this checkbox cannot be found is that it's dynamically generated once a certain value is chosen from a listbox. It doesn't exist before the value from the listbox has been selected. I already tried a small delay or clicking on a random element on the page first to give it some time to detect the checkbox.
Start
[SUCCES] - Open page
[SUCCES] - Click dropdown
[SUCCES] - Choose value (either with invoke action or with a mouse 'click')
-- the checkbox is generated --
[FAIL] - Check Checkbox (either with invoke action or with a mouse 'click')
Abort test
Once aborted, if I choose to 'Run Selected Items' on the 'check checkbox' step that had failed during prior execution, it works. Because, in this case, the checkbox already exists (as it was generated during the first, failed execution):
Start
[SUCCES] - Check Checkbox (either with invoke action or with a mouse 'click')
The problem seems to be that Ranorex 'indexes' all the elements on the page once it opens, and fails to update its repository once this checkbox is dynamically generated.
What I'm looking for is the c# command to refresh the repository.
Thanks in advance, have a nice weekend,
Arnout
Windows 7
Ranorex 6.0 (most recent version)
Application I'm testing against: Oracle Forms 11
I'm looking for a way to refresh the repository during test execution.
The reason is this:
I have a checkbox listed in the repository, which can never be found during execution. Once I abort execution and open the spy through the repository however, the element can be found and the 'highlight' option highlights the element without any problems.
The reason this checkbox cannot be found is that it's dynamically generated once a certain value is chosen from a listbox. It doesn't exist before the value from the listbox has been selected. I already tried a small delay or clicking on a random element on the page first to give it some time to detect the checkbox.
Start
[SUCCES] - Open page
[SUCCES] - Click dropdown
[SUCCES] - Choose value (either with invoke action or with a mouse 'click')
-- the checkbox is generated --
[FAIL] - Check Checkbox (either with invoke action or with a mouse 'click')
Abort test
Once aborted, if I choose to 'Run Selected Items' on the 'check checkbox' step that had failed during prior execution, it works. Because, in this case, the checkbox already exists (as it was generated during the first, failed execution):
Start
[SUCCES] - Check Checkbox (either with invoke action or with a mouse 'click')
The problem seems to be that Ranorex 'indexes' all the elements on the page once it opens, and fails to update its repository once this checkbox is dynamically generated.
What I'm looking for is the c# command to refresh the repository.
Thanks in advance, have a nice weekend,
Arnout
Windows 7
Ranorex 6.0 (most recent version)
Application I'm testing against: Oracle Forms 11