webdriver via API

Class library usage, coding and language questions.
fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

webdriver via API

Post by fwason » Fri Apr 07, 2017 10:30 pm

I've upgraded to v7, and configured the Selenium Server. I've tested via port 4444 and confirmed that I can reach the \wd\hub page and view the session list.

We do not use the Ranorex IDE - our framework is build and maintained entirely in Visual Studio. How can I configure the suite to make use of the Webdriver endpoint? Using a dummy project in Ranorex IDE, I saw that a shortcut to the [email protected] was created, which points to my exe /endpoint:WebDriver. But I don't know what else Ranorex is doing under the covers to take advantage of webdriver.

Has anyone configured and used the WebDriver endpoint within visual Studio, with references to Ranorex libraries? Which libraries do I need to reference, and what else must be done?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: webdriver via API

Post by Support Team » Mon Apr 10, 2017 2:03 pm

Hello fwason,

Unfortunately there is currently no way to access the Selenium WebDriver via the Ranorex API.

I would like to direct you to our Ranorex User Voice platform. Via the Ranorex User Voice you can submit your idea and have the community evaluate it by voting. The most voted-for ideas will get considered for implementation. You can find the Ranorex User Voice platform at the following link: http://www.ranorex.com/uservoice.html

If you have any other questions, don't hesitate to ask.

Regards,
Tomaž
.
Image

fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

Re: webdriver via API

Post by fwason » Fri Apr 14, 2017 7:58 pm

Perhaps we can work together on this. I recognize that Webdriver is treated as an endpoint, so somehow your "testcase" is being driven to that endpoint.
Our testcase is really just a definition of the test, not a test itself. Testcases are comprised of actions, which drive the testing within the AUT.
Maybe if you can describe how you drive tests created in the Ranorex IDE through the test driver, we can either 1) reference and utilize your webdriver hook(s) or
2) create a similar analog that will work in our environment.

it would be a shame, as I stated in my earlier post toward the beginning of the year, if the work we've done in the past 5 years needs to be abandoned because of the Edge issue. If we need to learn Selenium, I think we will simply just move to Selenium and cut out the middle man and middle costs.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: webdriver via API

Post by Support Team » Tue Apr 18, 2017 2:19 pm

Hello fwason,

Unfortunately I am not able to help you at this moment since the Selenium WebDriver is currently not accessible via the Ranorex API.

I would once more like to refer you to our Ranorex User Voice platform. Ranorex User Voice can be accessed via the following link: http://www.ranorex.com/uservoice.html
Based on your feature request submitted there, it could be possible to access the Selenium WebDriver using Ranorex API in the future.

Sincerely,
Tomaž
.
Image

fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

Re: webdriver via API

Post by fwason » Tue Apr 18, 2017 4:52 pm

Already done.
Please, anyone interested in EDGE support, vote here:
http://uservoice.ranorex.com/forums/150 ... -webdriver

thanks!!! We'd hate to have to move to Telerik after 5+ years!!!

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

Re: webdriver via API

Post by krstcs » Wed Apr 19, 2017 4:13 pm

Ranorex does not have full integration with Visual Studio. You should use Ranorex Studio if you need Ranorex-specific features such as the Repository, Test Suites, or End Points.

There are just some things that they are not going to make available outside of the Ranorex Studio environment, since they have spent a lot of time and money in creating it. This is as much a business decision as a technical one.
Shortcuts usually aren't...

fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

Re: webdriver via API

Post by fwason » Thu Apr 20, 2017 8:44 pm

Ranorex advertises full support... feel free to check their documentation.

Additionally, I have a commitment via private email that they are adding support for WEbDriver via API in an upcoming release. it should be as simple as referencing a library in the same way that I reference Ranorex.Plugin.ChromeWeb (and MozillaWeb, and Web).

Competition, such as Telerik, already have support for this via their APIs, so this drives a business need.

You have posted incorrect information in reply to my posts in the past... it is frustrating. Please don't answer for Ranorex, especially in terms of their business plans and road maps. You have demonstrated that you don't know what you're talking about, and have caused confusion I'm sure for more than 1 reader.

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

Re: webdriver via API

Post by krstcs » Fri Apr 21, 2017 1:42 pm

I'm sorry if what I posted confused the issue for you, that wasn't my intention. However, everything I posted is absolutely true. And I don't answer for Ranorex, I never have.

They advertise full support for their products, they are under no obligation to add support for Visual Studio or any other 3rd party IDE. If they add API support for a specific technology, great, but they make and sell Ranorex Studio specifically for the purpose of using their tools for software test automation. If you aren't going to use their toolset, then you have to take what you get, and they don't have to support you.
Shortcuts usually aren't...

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: webdriver via API

Post by Aracknid » Fri Apr 28, 2017 9:16 pm

My 2 cents:

I'm in the same boat as fwason. Everything we do is in VisualStudio. When Windows 10 Anniversary came out and broke Ranorex support for Edge, I didn't expect the solution would be what it currently is. While this move to supporting webdriver seems pretty cool and interesting, it seems a lot more complex to get things set up and going, and from my limited point of view a lot of work just to test Edge. I get there is more here, like other browsers on other OSes. I get that webdriver is becoming a standard.

I'd like to point out a few things:

Ranorex many years ago used to sell different types of licenses, and one type was "Professional" for people who were only interested in using the Ranorex API to develop in other environments, such as Visual Studio. Their sales model encouraged it. It was cheaper than paying to get everything. This is when we jumped on board and created the framework we have. We were always able to do everything from Visual Studio that could be done in Ranorex Studio as far as I know.

Over the years, the "professional" license just disappeared. New Ranorex features and tools started coming out in newer versions to make developing more robust for those using the Ranorex Studio. I’m sure most of these features are well received by those using Ranorex Studio or new customers, but typically useless to Visual Studio / Ranorex API developers.

And now we arrive at Ranorex 7 and new features are only available through the Ranorex Studio development process, including support for certain browsers and other OSes? That's disappointing. What’s also confusing is the messaging I’m getting from Ranorex (the company) on this. I asked through other channels about support for us Visual Studio developers. Would our compiled console EXE scripts work through this new process if we wanted to test Edge? I’ve been told “probably” and “yes, likely”, but never no. Your own blog posting from Ranorex 7 Webinar also implies it is possible. See the answer to “Can I reuse my existing Ranorex tests, which I have created entirely in code without using the object repository and run them on endpoints?” I must admit I’ve not yet tried any of this. I’m not looking forward to spending the time to find out it doesn’t work. I’m busy with other things.

Improvements to Ranorex are always welcomed. The more they sell, the better it will be for us users. I just don’t want to be abandoned because I choose the less popular path 5+ years ago.

Aracknid.

ahoisl
Certified Professional
Certified Professional
Posts: 125
Joined: Fri Sep 07, 2007 8:16 am

Re: webdriver via API

Post by ahoisl » Wed May 03, 2017 8:18 am

Hi everyone,

I'd like to share my point of view from the Ranorex development team.

First, to the technical problem regarding API access to the new WebDriver and endpoint feature in Ranorex.
It's true that you cannot currently define new endpoints using an API. You can, however, define the endpoints using Ranorex Tools (e.g. Spy) and add the configuration file to your project in order to deploy it with the test executable (see Solution Settings). At runtime, you can then make a defined endpoint the current host (just like the test suite does) using the Host.MakeCurrentHost method passing the name of the endpoint, thus making it available as if being a local Host adapter.
Besides that we are working on API to make the underlying WebDriver endpoint available to the user, but if you are not a Selenium user already, that is probably not what you want - although your UserVoice request says so... Maybe you can elaborate on that if the above solution is not what you want.

Second, to the non-technical issues :-)
krstcs wrote:Ranorex does not have full integration with Visual Studio. You should use Ranorex Studio if you need Ranorex-specific features such as the Repository, Test Suites, or End Points.
It is true that Ranorex does not provide a Visual Studio extension. So, if you are using Visual Studio together with Ranorex Tools like the repository or recordings, you need to trigger a code update for recording/repository instances yourself. Besides that, Ranorex DLLs are perfectly fine to be referenced with Visual Studio, so full support in that terms.
Aracknid wrote:And now we arrive at Ranorex 7 and new features are only available through the Ranorex Studio development process, including support for certain browsers and other OSes? That's disappointing.
That's certainly not the case. For almost everything that is possible via Ranorex Studio there is an API that allows the same functionality from code. There may be exceptions to this, like currently for configuring endpoints, but if there is a need for such an API, we will provide it.

We as developers just try to minimize the public API as much as possible, consequently we create public APIs only for functionality that is really needed. The reason is that unlike features provided by Ranorex Studio, there is no easy upgrade or conversion path for APIs: the format of Ranorex Studio files is well-defined and it is technically easy to upgrade/change the internal structure without causing problems for users. The same is almost impossible for APIs, since we would need to find and update user code that may be in other projects, in compiled DLLs, invoked via reflections, and so on... Moreover, we don't even know how many people are using our APIs (for features in Ranorex Studio we can at least estimate their usage based on telemetry).
We used to provide too many public APIs in the past that are now hindering our development process, because we are not able to change internal structures without breaking changes in the public APIs - causing troubles on upgrading for a pretty much unknown number of users.
Aracknid wrote:Would our compiled console EXE scripts work through this new process if we wanted to test Edge? I’ve been told “probably” and “yes, likely”, but never no.
The same reason as stated above is why you will not get a "Yes, sure" answer. Without thoroughly inspecting your project, no one can tell how you used our APIs and it could be that we did not consider your use case with a new feature. Chances are good everything just works well, but you can only tell by trying it out.
Aracknid wrote:Over the years, the "professional" license just disappeared. New Ranorex features and tools started coming out in newer versions to make developing more robust for those using the Ranorex Studio. I’m sure most of these features are well received by those using Ranorex Studio or new customers, but typically useless to Visual Studio / Ranorex API developers.
Letting the "Professional" license go wasn't an easy choice. Although we had only a handful of users buying that license, there were a few real "professionals" among them - i.e. testing and automation enthusiasts that could handle automation projects very well on their own without help from our tools.
There were two problems, though: first, making the value of that license clear to customers, when all you get is Spy and Repository (when compared to runtime) and you have to re-generate repository code on your own. And second, many users buying that license would just do it to save some money, but were not able to get their automation project going on their own without massive support from our side - or worse, they started into a wrong direction and made Ranorex to blame for projects that were not going well...
Both problems led us to concentrate on a simple licensing modal with just two license types: one for running tests and one for creating/designing them with the help of our tools.
Still, if there are enough people wanting that license type back, we might give it another try - with uservoice you got a great tool at hand to show our product management what you want :D

Sorry for the long post, I tried to cover most of the topics in this thread and share some reasons behind our decisions.

Regards,
Alex
Ranorex Team