Page 1 of 1

Ranorex 7: Equivalent to WebDocument

Posted: Tue Apr 25, 2017 5:09 pm
by SteveO_za
Hi

I'm trying to do some basic Java injection.
Using an example from a previous post:

Host.Local.OpenBrowser("anActualURL", "Chrome", "", false, false);
WebDocument webDocument = @"/dom[@domain='anActualURL' and @caption='Test Automation Tools - Ranorex Automation Framework']";
webDocument.ExecuteScript("document.write('Hello World!');");

(sorry can't put in a URL - new accounts are not allowed - but it's Ranorex's)

This requires a few of the plugins (Ranorex.Plugin.Web, Ranorex.Plugin.Msaa, etc) from Ranorex 6 to work although the OpenBrowser is also missing a few default plugins...

How would I now do something similiar using Ranorex 7?

Thanks
Steve

Re: Ranorex 7: Equivalent to WebDocument

Posted: Wed Apr 26, 2017 1:24 pm
by krstcs
Ranorex 7 should work the same as 6 in this instance. You should see no difference.

Is there something in particular that you are having problems with? Is an error being thrown when you try it in 7?

Re: Ranorex 7: Equivalent to WebDocument

Posted: Wed Apr 26, 2017 4:49 pm
by SteveO_za
I found the issue.
Totally my fault, I reference Ranorex from within my Visual Studio project (add reference to the DLL's)
I was pulling the wrong DLL's

I was using the DLL's from:
C:\Program Files (x86)\Ranorex 7.0\RanorexStudio\bin
instead of
C:\Program Files (x86)\Ranorex 7.0\Bin

Of course it all works fine now...