Closing TAB of an Application

Ask general questions here.
mapa
Posts: 22
Joined: Tue Jun 06, 2017 7:29 am

Closing TAB of an Application

Post by mapa » Thu Jun 08, 2017 8:44 am

Hello guys,

as you can see in the screenshot, i am trying to close the inner tab of my application.
The problem is that Ranorex didnt recognize the close button as an own object.
So the Testcase sometimes executes the close button but in the most cases it did not.
If i put my application on fullscreen it is not working neither.
Do you know any solution ?
xPath:
/form[@title='iPoint Compliance Agent']/?/?/element[@accessiblename=$ipca_article_createName]

Thanks for your help

best regards
Attachments
2017-06-08_09h35_32.png
2017-06-08_09h35_32.png (57.43 KiB) Viewed 687 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Closing TAB of an Application

Post by odklizec » Fri Jun 09, 2017 8:52 am

Hi,

Unfortunately, without Ranorex snaphsot (not screenshot), it's hard to suggest something reliable. If the close button is not traceable by Ranorex, then you will most probably have to use screenshot-based action to identify and click it? As mentioned, without the snapshot, there is not much else anyone here can suggest.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mapa
Posts: 22
Joined: Tue Jun 06, 2017 7:29 am

Re: Closing TAB of an Application

Post by mapa » Fri Jun 09, 2017 9:14 am

i attached an snapshot
Attachments
closeTAB.rar
(1.46 MiB) Downloaded 40 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Closing TAB of an Application

Post by odklizec » Fri Jun 09, 2017 9:37 am

Thanks, now please tell me, what's inside $ipca_article_createName variable and which close button exactly in GUI you want to click?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mapa
Posts: 22
Joined: Tue Jun 06, 2017 7:29 am

Re: Closing TAB of an Application

Post by mapa » Fri Jun 09, 2017 10:31 am

the snapshot i send to you is not from our original solution it is just a rebuilded solution for you.
The variable is filled with a name for the new article. if a new article is created this new window pops up.
The window has the name of this variable, thats why i put this variabel into the xPath.
After the new article is created we want to close this pop up window again. The problem is that it is not working dependably because he didnt recognize the close button as its own object. So if i put my application on fullscreen it is not working anymore. Also when it is minimized it is not working on all machines. We have actually no idea what the problem is and how we can solve this. I have already tried to solve it via code-module but i cant only close this single tab, it always closes the whole application.
In case that this is absolutely mandatory for us, i hope you can help us soon.

Best regards

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Closing TAB of an Application

Post by qwertzu » Mon Jun 12, 2017 1:58 pm

Hello Mapa,

Have you already tried to add the process name of the application to the GDI Capture list?
If not, please try it and see, whether this helps in order to track the close button.
addToGDI.png
addToGDI.png (15.37 KiB) Viewed 654 times
I hope, this helps.

regards,
qwertzu

mapa
Posts: 22
Joined: Tue Jun 06, 2017 7:29 am

Re: Closing TAB of an Application

Post by mapa » Tue Jun 13, 2017 9:11 am

Hi guys,

thanks for your advice!
As you can see in my screenshot i am not able to add this Element to the GDI list.
Also i was only able to add the whole application to the GDI List but this doesn´t have had any effect.

regards,
Patrick
Attachments
^EA22EBB124FB0931529B82B500B3C1A504ADF6FDBBFE29BB2D^pimgpsh_thumbnail_win_distr.jpg
^EA22EBB124FB0931529B82B500B3C1A504ADF6FDBBFE29BB2D^pimgpsh_thumbnail_win_distr.jpg (6.71 KiB) Viewed 638 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Closing TAB of an Application

Post by odklizec » Tue Jun 13, 2017 9:36 am

OK, at first, I would suggest to play a bit with Ranorex Settings >> Plugins tab >> Java section. Try to enable disabled options and refresh the spy to see if it helps or not. If not, then I'm afraid, your only hope is to use screenshot-based action, which should detect and click [x] button in given tab.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

fleipold
Posts: 37
Joined: Fri Jun 09, 2017 7:04 am

Re: Closing TAB of an Application

Post by fleipold » Tue Jun 13, 2017 10:26 am

Is there a documentation despite this one ?
https://www.ranorex.com/support/user-gu ... tings.html
So that we know what each parameter is exactly for ?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Closing TAB of an Application

Post by odklizec » Tue Jun 13, 2017 10:59 am

Hi,

The only documentation (as far as I know) related to Ranorex settings is available here:
https://www.ranorex.com/support/user-gu ... rview.html
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

fleipold
Posts: 37
Joined: Fri Jun 09, 2017 7:04 am

Re: Closing TAB of an Application

Post by fleipold » Tue Jun 13, 2017 1:57 pm

hi

so i tried to do it via the imaged based recording and had no luck until now either. I have added some screenshots. Maybe i did something wrong

Regards Florian
Attachments
screenshot_16.jpg
screenshot_16.jpg (122.37 KiB) Viewed 629 times
screenshot_15.jpg
screenshot_15.jpg (102.16 KiB) Viewed 629 times
screenshot_13.jpg
screenshot_13.jpg (24.95 KiB) Viewed 629 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Closing TAB of an Application

Post by odklizec » Tue Jun 13, 2017 2:13 pm

Why you are automating "Restore" button? I believe you wanted to "close" the tab, so you need to record [x] button?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

fleipold
Posts: 37
Joined: Fri Jun 09, 2017 7:04 am

Re: Closing TAB of an Application

Post by fleipold » Wed Jun 14, 2017 1:22 pm

I did record the xbutton too. I wasn´t working.
So i additionally recorded the restore button to be sure to have all windows maximized because i wasn´t sure if the other windows in the background were a problem for the image recognition

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Closing TAB of an Application

Post by qwertzu » Wed Jun 21, 2017 2:06 pm

Hello Fleipold,

Could you please describe, what exactly was not working when trying to image based record the close button?

regards,
qwertzu

Vaughan.Douglas
Posts: 250
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: Closing TAB of an Application

Post by Vaughan.Douglas » Wed Jun 21, 2017 3:20 pm

I'm pretty confused. Does the provided snapshot contain the element you're trying to hit?

Based on the images and other context I believe you're trying to hit the close button (the red X) on the form labeled "TEST", but that form isn't in the snapshot.

You could see if there is a close action you can invoke on the base form (com.ipointsys.swing.components.InternalFrame) or the container immediately underneath (javax.swing.JTabbedPane)

Otherwise you could go with good old relative coordinates since you know that red X is going to be in the same location all the time.
Doug Vaughan