Alternative to 'Location'

Ask general questions here.
moses.rozario
Posts: 14
Joined: Wed May 20, 2015 11:06 am

Alternative to 'Location'

Post by moses.rozario » Wed May 20, 2015 11:12 am

Is there any alternative to 'Location' (this is column, which can be seen while editing recording)? I am facing difficulty when it comes about running the script and Ranorex is not able to do it exactly. I am not comfortable Location, which appears like co-ordinates. Since the screen can change anytime. Can anyone please help me? Thanks.

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

Re: Alternative to 'Location'

Post by odklizec » Wed May 20, 2015 1:05 pm

Hi,

Values in Location columns are relative coordinates (relative to the pointed element). So even if the element moves somewhere else, the coordinates should be still valid. Of course, the coordinates may become invalid in case the size of element changes ;)

Here you can find how to change the coordinates per selected element (or multiple elements)...
http://www.ranorex.com/support/user-gui ... html#c3069
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

Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Alternative to 'Location'

Post by Fergal » Wed May 20, 2015 3:09 pm

If you go to Global Settings > Recorder Defaults > Coordinate Recording Mode you can change the option to "None". That way new recordings won't use pixel coordinate locations and your recordings may run more successfully, when screens change.

For existing recorded actions you can click on the "Location" field and select a different option, e.g. "Center" from the drop down list.

moses.rozario
Posts: 14
Joined: Wed May 20, 2015 11:06 am

Re: Alternative to 'Location'

Post by moses.rozario » Thu May 21, 2015 6:58 am

Thanks Fergal. Global settings option worked well. Thanks to odklizec as well, I will try your method in other case and see the output.

Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Alternative to 'Location'

Post by Fergal » Thu May 21, 2015 10:30 am

You're welcome moses.rozario, glad you got it working.

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Alternative to 'Location'

Post by c676228 » Wed May 27, 2015 8:03 pm

What Chrome version 43? The ssl warning/error page has two link buttons that I cannot track using either Ranorex or Chrome development tool. When I recorded the clicking through actions, both links have the same IDs(dynamically created) and RxPath, the locations are different.
I am not sure how to get around the location issue in this particular case.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Alternative to 'Location'

Post by krstcs » Wed May 27, 2015 8:30 pm

Betty, have you turn on accessibility in Chrome?

Type (or copy-paste) this into Chrome's address bar and hit "Enter":

Code: Select all

chrome://accessibility
Turn on "Gobal accessibility mode".

This should allow Ranorex to identify these internal Chrome buttons.

See this thread for a bit more information: http://www.ranorex.com/forum/ranorex-is ... t4534.html
Shortcuts usually aren't...

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Alternative to 'Location'

Post by c676228 » Wed May 27, 2015 11:16 pm

Hi krstcs,

Thanks for the great info.

Betty

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Alternative to 'Location'

Post by krstcs » Thu May 28, 2015 3:20 pm

You're welcome!
Shortcuts usually aren't...

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Alternative to 'Location'

Post by c676228 » Thu May 28, 2015 6:54 pm

I tried today after turn on accessibility. it seems that it can recognize a div for those links.
I am wondering if it is dependable for clicking on the div area to get the page pass the ssl warning.

Thanks,
Betty

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Alternative to 'Location'

Post by c676228 » Thu Jun 04, 2015 11:14 pm

I used popupwather for click through ssl cert warning with IE/Firefox. It works fine.
However, I have some difficulty to do with Chrome. Even Accessibility is turned on. Most of time the two divs(warnings) are not recognizable. Occasionally it can recognize them when the script is not running. However, it never recognized during the run time.
I am using Chrome Version 43.0.2357.81.

I am not sure if somebody there have the same experience.

Thanks,
Betty

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Alternative to 'Location'

Post by Support Team » Mon Jun 08, 2015 9:59 am

Hi Betty,

Please try to start Chrome with the following argument "'--disable-web-security'".
Additionally, to be sure Chrome is always started with accessibility enabled, you could also use this argument "--force-renderer-accessibility".

Regards,
Markus

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Alternative to 'Location'

Post by c676228 » Sat Jul 25, 2015 4:53 pm

Hi Markus,

Just come back to the issue I was dealing with.
I will check on this option on Monday. I have seen quite a number of posts about the issue.
I also see a number of posts about handling ssl warning page by using popupwatcher.
http://www.ranorex.com/forum/using-popu ... t5409.html

It is still a pain since there are a number of browsers you need to handle/configure/map.
I am wondering if Ranroex could have a method with something like
Host.Local.OpenBrowser with an option of disabling ssl warning.

I am trying to think about a customized certificate validation method.
ServicePointManager.ServerCertificateValidationCallback = delegate { return true;}

But I haven't figure out the place the method gets called before opening a test site.
I am going to try to put it in Program.cs, not sure it would work.

Thanks,
Betty

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Alternative to 'Location'

Post by c676228 » Mon Jul 27, 2015 8:12 pm

Hi,

Preset the ServicePointManager.ServerCertificateValidationCallback = delegate { return true;}
in Program.cs is ok.
However when I using Host.Local.OpenBrowser method to open a url. The ssl warning still presents.

Can someone tell me how to apply this delegate before opening a browser. It seems that it has to be attached to a system call. Otherwise it won't work.

Thanks,
Betty

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Alternative to 'Location'

Post by c676228 » Mon Jul 27, 2015 8:42 pm

Hi Markus,

I did try your method by using in DOS
chrome.exe "mysite.com" --disable-web-security
The security warning still comes up.
Version 44.0.2403.107

Thanks,
Betty