Page 1 of 1

IOS7 - cannot enter text into a text field via ranorex

Posted: Mon Feb 10, 2014 12:14 am
by caleb
I'm attempting to automate an IOS application.

I have a web view in the application and I can find the correct input field but when I attempt to use the PressKeys method it throws an exception to say this method is not implemented.

Code: Select all

inputBox.PressKeys("the quick brown fox");


I then attempted to use the SetAttributeValue method on the input field which did enter text. However the text disappears as soon as another field was selected or the keyboard is hidden.

Code: Select all

inputBox.element.SetAttributeValue("Value", "the quick brown fox");
Is there a better way to input text in an IOS application when testing with Ranorex?

I am using Ranorex 4.1.5 and developing against an ipad air from a Windows 7 pc

Thanks

Caleb

Re: IOS7 - cannot enter text into a text field via ranorex

Posted: Tue Feb 11, 2014 1:16 pm
by Support Team
Hi Caleb,

Is it currently just possible to use the "SetAttributeValue" method to set the text of a mobile text element.
Does it work when you set the value of the "Text" attribute instead of the "Value" attribute?
inputBox.element.SetAttributeValue("Text", "the quick brown fox");
Can you post a Ranorex snapshot file of your inputBox element?

Regards,
Markus

Re: IOS7 - cannot enter text into a text field via ranorex

Posted: Thu Feb 13, 2014 2:27 am
by caleb
Setting the attribute value of "text" did not work, when I tried it nothing was entered in the text field although ranorex did not throw an error.

I have emailed a snapshot to your support desk.

Thanks

Caleb

Re: IOS7 - cannot enter text into a text field via ranorex

Posted: Fri Feb 14, 2014 11:42 am
by Support Team
Hi Caleb,

Thank you for the snapshot!

May I ask you to try the following?

Code: Select all

inputBox.Touch();
inputBox.element.SetAttributeValue("Value", "the quick brown fox");
inputBox.Touch();
// when this shouldn't work try to send an {ENTER} key press event on the main form (/mobileapp[@title='com.boardbooks.boardbooks']/form)
UIWindow.PressKeys("{ENTER}");
Does it work when you do so?

Regards,
Markus

Re: IOS7 - cannot enter text into a text field via ranorex

Posted: Thu Sep 18, 2014 1:15 am
by druiz
Hello,

I'm just facing this exact same problem. Actually I can enter the data in the input field but the validator is finding the values empty.

The event used to check if the fields are edited is "EditingChanged".

I already tried with all the workarounds suggested here (touching the element before editing, setting the property using element.SetPropertyValue(), using element.PressKey("{ENTER}"), even I tried pressing the SpaceBar in the keyboard) and also combine them.

My system details are:

Ranorex version: 5.1.2
OS: Windows 7
Device: iPhone 5S (iOS 7.1.2)

I'm really looking forward for a solution because I can not go further in my app testing due to this issue.

Cheers

David

Re: IOS7 - cannot enter text into a text field via ranorex

Posted: Fri Sep 19, 2014 1:06 pm
by Support Team
Hi druiz,

If the suggested workaround above do not work it would be great to get your application (XCode project) in order to analyze the issue in more detail. May I ask if you are using the correct Ranorex Automation library (v1.6.2)?
If it is possible to get your application please send it to [email protected].
Thank you.

Regards,
Bernhard