iOS: the function PressKeys("{Enter}") does not work

Bug reports.
JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

iOS: the function PressKeys("{Enter}") does not work

Post by JToelstede » Wed Sep 24, 2014 1:50 pm

Hi Support-Team,

after we made an update from Ranorex 4.1.6 to Ranorex 5.1.2 the function PressKeys("{Enter}") on an element during the iOS-keypad is displayed does not work any more in my usercode.

For a test I created a new recording module and recorded only a tap on the enter-button on the iOS-keypad.
The recorded lines of code are similar to my usercode for this function.
After that I run the new recording module and it does not work either.

Test-device:
iOS-Version: iOS 7.1.1
device: iPad

Ranorex:
Studio: 5.1.2.19431
RxAutomation Library: libRxAutomationUni v1.6.2

Thanks for help.

Best regards,
Jörg

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

Re: iOS: the function PressKeys("{Enter}") does not work

Post by Support Team » Fri Sep 26, 2014 3:01 pm

Hello Jörg,

Unfortunately, we are not able to reproduce this issue on our side. May I ask you to contact [email protected] for further investigation?

Thanks,
Robert
.
Image

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: iOS: the function PressKeys("{Enter}") does not work

Post by JToelstede » Wed Oct 01, 2014 2:36 pm

Hi Robert,

here an excample of the problem.
In our app we have a searchfield (iOS TextField). To set the searchvalue we use the function "SetValue" in our recording module.
Extract out of the codemodule:

Code: Select all

myrepo.Textfeld.Element.SetAttributeValue("Text", searchString);
After we set the searchstring we used in Ranorex 4.1.x the function "MobileKeyPress"->"Enter" to commit the searchstring and to start the search action.
Extract out of the codemodule:

Code: Select all

myrepo.Textfeld.PressKeys("{ENTER}"); 
After the keypress-function with Ranorex 4.1.x the search started and with Ranorex 5.1.x not.

Our app for each version (4.x and 5.x) is build on the same codebase, only the ranorex agent changed.

Hope that will help you to reproduce the error.

best regards,
Joerg

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: iOS: the function PressKeys("{Enter}") does not work

Post by JToelstede » Thu Oct 02, 2014 8:22 am

Hi Robert,

I have a second excample for you.
We have an iOS-app where you can store files (photos, pdfs, etc.) organized in folders.
In the popover to create new folder we have a textfield to set the name of the new folder and a button "Done", to create the new folder. You can also create the folder by using the Return-Button on the iOS-keypad.
Our button "Done" is disabled till you entered a name for the folder.

In our testcase we set the name using the function "Set Value - Text" and call after it the function "MobileKeyPress"->"Enter" which should create the folder but nothing happen.
After the MobileKeyPress function was called the keypad should fading out and our action should be called to create the new folder. That works with ranorex 4.1.6 but not with ranorex 5.1.2.

As a workaround I thought that I could use a touch action on the "done" button, but it's still disabled after I set the foldername with the function "set value", but that is an other problem.

I hope that one of these excamples could helb you to reproduce the problem.

Best regards
Joerg

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

Re: iOS: the function PressKeys("{Enter}") does not work

Post by krstcs » Thu Oct 02, 2014 6:27 pm

First, have you contacted [email protected] as they asked? They may want you to send them a snapshot of the AUT. It will help them understand your application and possibly give them a clue as to how to help.

Second, the SetAttributeValue method MAY NOT be firing any events on the element in question. It just sets the internal value. If your app is not setup to recognize the new value, then your app will never notice the change and your "Enter" key and the "Done" button will not activate. This is a limitation of how this particular method works in conjunction with how your app is coded. There may be nothing that Ranorex can do about this, it may require that your developers re-work the event system. It might be better in this case if you did not have to use the SetAttributeValue method, but I don't do mobile testing at this point, so I don't know what is or isn't available. Have you tried Keyboard.Press()?

Keyboard.PrepareFocus(<element>);
Keyboard.Press(<keys>);
Shortcuts usually aren't...

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: iOS: the function PressKeys("{Enter}") does not work

Post by JToelstede » Mon Oct 06, 2014 12:27 pm

Dear krstcs,

thanks for your reply.

1. No, I have not contacted [email protected] till now. I thougth that the two excamples would help Robert (is he not a member of the Support-Team) to analyse the problem.

2.
krstcs wrote:...the SetAttributeValue method MAY NOT be firing any events on the element in question. It just sets the internal value.
That's why I used the "MobileKeyPress"->"Enter" function on the element after setting the value by the function "SetAttributeValue". That worked perfect with Ranorex 4.1.6 and after I switched to Ranorex 5.1.2 it doesn't work anymore. Please notice that our app for each version (4.x and 5.x) is build on the same codebase, only the ranorex agent changed.
krstcs wrote:It might be better in this case if you did not have to use the SetAttributeValue method, but I don't do mobile testing at this point, so I don't know what is or isn't available. Have you tried Keyboard.Press()?

Keyboard.PrepareFocus(<element>);
Keyboard.Press(<keys>);
That is not available for iOS testing.
Here an extract out of the Ranorex Tutorial for iOS testing.

Code: Select all

Action #4 is a 'Set Value' action, which is typically used for keyboard input.

Action #5 is a 'Mobile Key Press' action. With a 'Mobile Key Press' action you can simulate the 'Enter' button on your devices keyboard.
Best regards.

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

Re: iOS: the function PressKeys("{Enter}") does not work

Post by Support Team » Thu Oct 09, 2014 3:14 pm

Hello guys,

We are currently in contact with the customer via email. We will update the forum as soon as we found a solution for the issue.

Regards,
Robert
.
Image

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

Re: iOS: the function PressKeys("{Enter}") does not work

Post by Support Team » Thu Nov 06, 2014 12:55 pm

Hello all,

The issue was reproducible on our side. We will try to resolve the issue as soon as possible.
Thank you for your patience.

Regards,
Robert
.
Image

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

Re: iOS: the function PressKeys("{Enter}") does not work

Post by Support Team » Tue Jan 13, 2015 1:05 pm

Hello guys,

We were able to fix this bug with Ranorex 5.2.1

Please let us know if you are still facing the previously mentioned issue.

Thanks,
Robert
.
Image

JToelstede
Posts: 55
Joined: Fri May 24, 2013 12:57 pm

Re: iOS: the function PressKeys("{Enter}") does not work

Post by JToelstede » Tue Feb 10, 2015 1:00 pm

Hi Robert,

many thanks for your feedback.
With your fix everything works fine.


Thanks
Joerg

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

Re: iOS: the function PressKeys("{Enter}") does not work

Post by Support Team » Wed Feb 11, 2015 9:49 am

Hi Joerg,

I'm pleased to hear that.

Regards,
Robert
.
Image