Does not recognize tabs!

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
mghali
Posts: 26
Joined: Fri Jul 18, 2014 9:05 pm

Does not recognize tabs!

Post by mghali » Fri Jul 18, 2014 9:21 pm

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. :shock:

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: Does not recognize tabs!

Post by mzperix » Mon Jul 21, 2014 11:14 am

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

mghali
Posts: 26
Joined: Fri Jul 18, 2014 9:05 pm

Re: Does not recognize tabs!

Post by mghali » Wed Jul 30, 2014 4:06 pm

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.
Last edited by mghali on Wed Aug 06, 2014 5:35 pm, edited 1 time in total.

Bat
Posts: 16
Joined: Thu Jul 03, 2014 2:16 pm

Re: Does not recognize tabs!

Post by Bat » Thu Jul 31, 2014 2:42 pm

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

Code: Select all

tabpage[@text='Patients']
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']

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: Does not recognize tabs!

Post by mzperix » Fri Aug 01, 2014 12:13 pm

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