Ranorex API for setting cursor into Ranorex.InputTag

Class library usage, coding and language questions.
romanh
Posts: 1
Joined: Thu Sep 03, 2020 3:39 pm

Ranorex API for setting cursor into Ranorex.InputTag

Post by romanh » Thu Sep 03, 2020 6:41 pm

Hi there.

Is there Ranorex API for setting mouse cursor into 'Ranorex.InputTag' element?
I do not use Ranorex Studio but use Ranorex.Core, Version=9.2.1.0 library for C# code.

I have a Word add-in that opens browser page in it. I need to type text into TextBox on that page.

I tried

Code: Select all

Ranorex.InputTag.Value = "myText";
but it doesn't trigger javaScript on a page and validation message doesn't appear on the screen that not ok for me.

Also I tried clicking inot element and typing text

Code: Select all

Adapter.Click;
Adapter.PressKeys("myText");
but it doesn't work because after updating from Ranorex.Core, Version=8.0.3 to Ranorex.Core, Version=9.2.1.0

Code: Select all

Adapter.Click;
method doesn't click into my TextBox but clicks to [0, 0] coordinates.

Appreciate for any help.

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

Re: Ranorex API for setting cursor into Ranorex.InputTag

Post by odklizec » Fri Sep 04, 2020 6:37 am

Hi,

If the command clicks to 0,0 position (app UI or whole screen), then the element stored in adapter is most probably incorrect or not entirely loaded yet?

At first, you should try the most recent version 9.3.3. There is no point of debugging such kind of issue with obsolete Ranorex version. And I'm afraid, 9.2.1 is way too old and no longer supported.

At next, I would strongly suggest to try to replicate the problem with Ranorex Studio, both with recording table and user code. If the problem happens with Studio too, then I would recommend to debug the adapter, if it really contains the element you are looking for? Additionally, what you can try, is to split the Adpater.Click() to individual Move() and Click() commands and add slight delay between them.

Hope something from above will help? ;)
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

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Ranorex API for setting cursor into Ranorex.InputTag

Post by Stub » Fri Sep 04, 2020 8:19 am

I use Ranorex v9.3.2 to click on and type into an InputTag just fine. Sounds like it worked before and something has changed during your upgrade.