Page 1 of 2

Alternative to 'Location'

Posted: Wed May 20, 2015 11:12 am
by moses.rozario
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.

Re: Alternative to 'Location'

Posted: Wed May 20, 2015 1:05 pm
by odklizec
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

Re: Alternative to 'Location'

Posted: Wed May 20, 2015 3:09 pm
by Fergal
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.

Re: Alternative to 'Location'

Posted: Thu May 21, 2015 6:58 am
by moses.rozario
Thanks Fergal. Global settings option worked well. Thanks to odklizec as well, I will try your method in other case and see the output.

Re: Alternative to 'Location'

Posted: Thu May 21, 2015 10:30 am
by Fergal
You're welcome moses.rozario, glad you got it working.

Re: Alternative to 'Location'

Posted: Wed May 27, 2015 8:03 pm
by c676228
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.

Re: Alternative to 'Location'

Posted: Wed May 27, 2015 8:30 pm
by krstcs
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

Re: Alternative to 'Location'

Posted: Wed May 27, 2015 11:16 pm
by c676228
Hi krstcs,

Thanks for the great info.

Betty

Re: Alternative to 'Location'

Posted: Thu May 28, 2015 3:20 pm
by krstcs
You're welcome!

Re: Alternative to 'Location'

Posted: Thu May 28, 2015 6:54 pm
by c676228
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

Re: Alternative to 'Location'

Posted: Thu Jun 04, 2015 11:14 pm
by c676228
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

Re: Alternative to 'Location'

Posted: Mon Jun 08, 2015 9:59 am
by Support Team
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

Re: Alternative to 'Location'

Posted: Sat Jul 25, 2015 4:53 pm
by c676228
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

Re: Alternative to 'Location'

Posted: Mon Jul 27, 2015 8:12 pm
by c676228
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

Re: Alternative to 'Location'

Posted: Mon Jul 27, 2015 8:42 pm
by c676228
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