IOS7 - cannot enter text into a text field via ranorex

Mobile Testing, Android App Testing.
caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

IOS7 - cannot enter text into a text field via ranorex

Post by caleb » Mon Feb 10, 2014 12:14 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Tue Feb 11, 2014 1:16 pm

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

caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

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

Post by caleb » Thu Feb 13, 2014 2:27 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Fri Feb 14, 2014 11:42 am

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

druiz
Posts: 11
Joined: Wed Jul 09, 2014 3:50 am

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

Post by druiz » Thu Sep 18, 2014 1:15 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Fri Sep 19, 2014 1:06 pm

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