Mobile Key Press {Enter} doesn't seem to do anything

Mobile Testing, Android App Testing.
ChrisG
Posts: 9
Joined: Mon Feb 15, 2016 4:16 pm

Mobile Key Press {Enter} doesn't seem to do anything

Post by ChrisG » Mon Feb 15, 2016 4:23 pm

Windows version Windows 10 64 Bit
iOS 9.2.1
Ranorex 5.4.3

I have a phonegap app which runs on iOS which I managed to instrument the ipa file fine. I then enter a username and password then click on the 'Go' button on the keyboard. When I was recording the test script it picked up all the button taps fine. However whenever it came to running the script the pressing on 'Go' button didn't seem to work.

#
Report.Log(ReportLevel.Info, "Touch", "Touch item 'ComTlcVitalFLO.VitalFLO.Text' at Center", repo.ComTlcVitalFLO.VitalFLO.TextInfo, new RecordItemIndex(1));
repo.ComTlcVitalFLO.VitalFLO.Text.Touch();
Delay.Milliseconds(500);

Report.Log(ReportLevel.Info, "Set Value", "Setting attribute value to 'chrisg' on item 'ComTlcVitalFLO.VitalFLO.Text'.", repo.ComTlcVitalFLO.VitalFLO.TextInfo, new RecordItemIndex(2));
repo.ComTlcVitalFLO.VitalFLO.Text.Element.SetAttributeValue("value", "chrisg");
Delay.Milliseconds(100);

Report.Log(ReportLevel.Info, "Touch", "Touch item 'ComTlcVitalFLO.VitalFLO.Password' at Center", repo.ComTlcVitalFLO.VitalFLO.PasswordInfo, new RecordItemIndex(3));
repo.ComTlcVitalFLO.VitalFLO.Password.Touch();
Delay.Milliseconds(500);

Report.Log(ReportLevel.Info, "Set Value", "Setting attribute value to 'testing' on item 'ComTlcVitalFLO.VitalFLO.Password'.", repo.ComTlcVitalFLO.VitalFLO.PasswordInfo, new RecordItemIndex(4));
repo.ComTlcVitalFLO.VitalFLO.Password.Element.SetAttributeValue("value", "testing");
Delay.Milliseconds(100);

Report.Log(ReportLevel.Info, "Keyboard", "Key '{ENTER}' press on 'ComTlcVitalFLO'.", repo.ComTlcVitalFLO.SelfInfo, new RecordItemIndex(5));
repo.ComTlcVitalFLO.Self.PressKeys("{ENTER}");
Delay.Milliseconds(100);

#

Above is the code from the script. Now for the life of me I can't figure out why the button press is not working. Is there any issue with Press.Keys {ENTER} that I haven't seen.

Chris

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

Re: Mobile Key Press {Enter} doesn't seem to do anything

Post by Support Team » Thu Feb 18, 2016 11:28 am

Hello Chris,

Basically, it should be possible to perform a mobile key press {ENTER} if the keyboard is enabled at that moment.

Alternatively, I would suggest adding the Go-button to the repository via Ranorex Spy and adding a touch action for that button.
touch_go_button.png
If this doesn't solve the issue, please upload a Ranorex Snapshot of the corresponding element. If you want, you also could send the snapshot to [email protected].

I look forward to hearing from you.

Sincerely,
Johannes
You do not have the required permissions to view the files attached to this post.