Regarding Drop and Drag functionality

Class library usage, coding and language questions.
Deepak_Singh
Posts: 76
Joined: Fri Mar 14, 2014 2:37 pm

Re: Regarding Drop and Drag functionality

Post by Deepak_Singh » Fri Apr 04, 2014 9:12 am

Hi,

Sorry but I am afraid that The Caching of the folder's is not helping here.
Is there any other option available?

By the Way I am not able to understand one thing, Why "SUPPORT TEAM" is not helping us out or atleast looking in the problem here. :?:

I hope to see a Reply/Suggestion from support team on this.

Thanks,
Deepak

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

Re: Regarding Drop and Drag functionality

Post by odklizec » Fri Apr 04, 2014 9:24 am

Hi,

I cannot speak on behalf of the support team, but in my humble opinion, they will not be able to help you out without the snapshot file and/or the access to your app, eventually your test project. I already asked you about the snapshot and access to your application under test. You see, it's hard to help you without seeing the problem. Maybe your application under the test is simply not Ranorex-friendly? Maybe there is something wrong in your test? Maybe it's something browser related (if we are discussing web-based application)? There are too many possibilities why it fails for you.
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

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

Re: Regarding Drop and Drag functionality

Post by mzperix » Fri Apr 04, 2014 10:30 am

Hi,

When you drag an element from the widgets, the structure of the DOM gets updated.
If your ranorexpath is not good enough, than after you drag the first element, the script will inevitably fail.

The things you can do to make your Ranorexpath more stable:
- try to recognise the widgets by a unique attribute, like @id, or @caption
- if the Ranorexpath contains indexes (like /div[13]/), then leave it out.
- make sure that after you make cahnges, check in Spy, that Ranorex still finds only one item.

But the best would be, if you could share the snapshot, screenshot or an example xpath.

Without more information, help in not efficient, as we are just firing in the sky our ideas.

Best regards,
Zoltán

Deepak_Singh
Posts: 76
Joined: Fri Mar 14, 2014 2:37 pm

Re: Regarding Drop and Drag functionality

Post by Deepak_Singh » Fri Apr 04, 2014 1:27 pm

Hi,

Here is the Snapshot of the object.
Kindly look into it and Provide your feedback.

Thanks In Advance,
Deepak
Last edited by Deepak_Singh on Tue Apr 08, 2014 7:34 am, edited 1 time in total.

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

Re: Regarding Drop and Drag functionality

Post by odklizec » Fri Apr 04, 2014 5:57 pm

Hi,

In the snapshot you uploaded, the actual element (the element with which the Spy is open) has a dynamic attribute "unselectable" which value is ON. I'm not an expert in web apps, but maybe this is the reason why Ranorex cannot click/select this element? ;)
unselectable.png
I think you need to use one level higher element (without "unselectable" attribute).
dummy_panel.png
Just replace div[1] at the end of path with preceding-sibling::div[1]
So the whole path should look like this:
/dom[@domain='ecp-qa.credit-suisse.com']//div[#'ecp-body']/iframe[@id='ecp-main-workspace']//body[#'layout-body']/div[6]/div[2]/div[1]/div/div/div/div/div/div[2]/div[1]/preceding-sibling::div[1]
Hope this helps?
You do not have the required permissions to view the files attached to this post.
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

Deepak_Singh
Posts: 76
Joined: Fri Mar 14, 2014 2:37 pm

Re: Regarding Drop and Drag functionality

Post by Deepak_Singh » Fri Apr 04, 2014 9:01 pm

Hi,

Will try this on monday. If this helps then you are a genius.
In the mean time if any other thing comes to your mind then please let me know.

@mzperix Anything on your mind??? :?:

Thanks in advance,
Deepak :D

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

Re: Regarding Drop and Drag functionality

Post by mzperix » Wed Apr 09, 2014 1:07 pm

Hi Deepak,

I don't see the snapshot attached, is there anything I am missing?

But I would say, based on the following RxPath:

Code: Select all

/dom[@domain='ecp-qa.credit-suisse.com']//div[#'ecp-body']/iframe[@id='ecp-main-workspace']//body[#'layout-body']/div[6]/div[2]/div[1]/div/div/div/div/div/div[2]/div[1]/preceding-sibling::div[1]

The only thing to identifiy the element is its index position. Try to use a more exact property, like Id, class, caption, or even text. This way, you can leave out all of the divs, and have an xpath like this (I assume the div has a unique ID):

Code: Select all

/dom[@domain='ecp-qa.credit-suisse.com']//div[#'ecp-body']/iframe[@id='ecp-main-workspace']//body[#'layout-body']//div[@id='some_id']
Of course, if there is a container div, that contains all of the needed widgets, you can put it into the xpath:

Code: Select all

/dom[@domain='ecp-qa.credit-suisse.com']//div[#'ecp-body']/iframe[@id='ecp-main-workspace']//body[#'layout-body']//div[@id='container_id']//div[@id='some_id']

I suggest to look more deeply into using Xpath, since this is the bread and butter of using Ranorex effectively: http://www.ranorex.com/support/user-gui ... xpath.html

Regards,
Zoltán

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

Re: Regarding Drop and Drag functionality

Post by odklizec » Wed Apr 09, 2014 1:12 pm

It seems Deepak removed the snapshot from his post?

BTW, Deepak, did you solve the D&D problem? Was it caused by the "unselectable" attribute?
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

Deepak_Singh
Posts: 76
Joined: Fri Mar 14, 2014 2:37 pm

Re: Regarding Drop and Drag functionality

Post by Deepak_Singh » Wed Apr 09, 2014 2:21 pm

Hi,

The help you guys gave me helped me to solve the issue.
And Yes because of the "unselectable" issue we were not able to drag it. We are currently in sync with the developers. Hope to get a solution soon.
I will definitely post the solution after I am done with it.

Thanks guys,
Deepak