Does not recognize tabs!
Does not recognize tabs!
I complete a recording and when the recording is run, it does not recognize the tabs that were selected and validated in the recording. Sometimes it runs the first time and does not work when repeated right after the report generation.
Re: Does not recognize tabs!
Hi mghali,
can yo share us some more information about this? Like some repository xpath, or a snapshot?
My first guess would be that you have the same page opened in different browsers or just on a different tab.
Either make sure that only one tab is open, or if the test needs to use more that one tab, than make sure to have a correct xpath, so ranorex can find the proper tab.
Best Regards,
Zoltan
can yo share us some more information about this? Like some repository xpath, or a snapshot?
My first guess would be that you have the same page opened in different browsers or just on a different tab.
Either make sure that only one tab is open, or if the test needs to use more that one tab, than make sure to have a correct xpath, so ranorex can find the proper tab.
Best Regards,
Zoltan
Re: Does not recognize tabs!
I am running a software where there are different tabs and it is required to select one.
I dont change the Xpath. I drag and drop the repository from the View Spy
the error is:
Failed to find item 'PatientsTestNewRepository.MedicompBeacon.ButtonNew'.
No element found for path '/form[@title='Medicomp Beacon']//tabpage[@index='0' and @controltypename='TabPage']//container[@controltypename='SplitterPanel' and @instance='1']/?/?/tabpage[@index='1' and @controltypename='TabPage']/container[@caption='']/toolbar[@controltypename='ToolStrip']/button[@accessiblename='New']' within 1m.
when the tab is present right there.
I dont change the Xpath. I drag and drop the repository from the View Spy
the error is:
Failed to find item 'PatientsTestNewRepository.MedicompBeacon.ButtonNew'.
No element found for path '/form[@title='Medicomp Beacon']//tabpage[@index='0' and @controltypename='TabPage']//container[@controltypename='SplitterPanel' and @instance='1']/?/?/tabpage[@index='1' and @controltypename='TabPage']/container[@caption='']/toolbar[@controltypename='ToolStrip']/button[@accessiblename='New']' within 1m.
when the tab is present right there.
Last edited by mghali on Wed Aug 06, 2014 5:35 pm, edited 1 time in total.
Re: Does not recognize tabs!
If I had to take a guess without seeing everything it's that it's timing out. Trying declaring the RxPath of the tabpage with the text (name) of the tab.
Like such
for the bold parts of the code
/form[@title='Medicomp Beacon']//tabpage[@index='0' and @controltypename='TabPage']//container[@controltypename='SplitterPanel' and @instance='1']/?/?/tabpage[@index='1' and @controltypename='TabPage']/container[@caption='']/toolbar[@controltypename='ToolStrip']/button[@accessiblename='New']
Like such
Code: Select all
tabpage[@text='Patients']
/form[@title='Medicomp Beacon']//tabpage[@index='0' and @controltypename='TabPage']//container[@controltypename='SplitterPanel' and @instance='1']/?/?/tabpage[@index='1' and @controltypename='TabPage']/container[@caption='']/toolbar[@controltypename='ToolStrip']/button[@accessiblename='New']
Re: Does not recognize tabs!
Hi mghali,
looking at your xpath, I think the problem lies on your xpath actually.
You want to click on New tab, when the Search Tab is open, right?
I think the problem is that the xpath of the New tab is different, when you are on the Search page, and when you are on the New page.
Run the scenario, until the testcase fails, and look the New tab in the Spy. Compare the xpath with your current xpath.
Another thing to consider that Ranorex cannot click on New button if it is not on screen. So the first action should be to click on Patient tab, then click on New tab.
Also, try to optimize your xpath. In general, using index and instance numbers is not a good idea. Verify, that the element is still found if you leave out those attributes.
Best Regards,
Zoltan
Best regards,
Zoltan
looking at your xpath, I think the problem lies on your xpath actually.
You want to click on New tab, when the Search Tab is open, right?
I think the problem is that the xpath of the New tab is different, when you are on the Search page, and when you are on the New page.
Run the scenario, until the testcase fails, and look the New tab in the Spy. Compare the xpath with your current xpath.
Another thing to consider that Ranorex cannot click on New button if it is not on screen. So the first action should be to click on Patient tab, then click on New tab.
Also, try to optimize your xpath. In general, using index and instance numbers is not a good idea. Verify, that the element is still found if you leave out those attributes.
Best Regards,
Zoltan
Best regards,
Zoltan