Set Value/Press Keys on iPad using Ranorex browser
-
- Posts: 13
- Joined: Wed Oct 28, 2015 3:54 pm
Set Value/Press Keys on iPad using Ranorex browser
Hi,
I'm currently attempting to automated the creation of a post on our website and the first stage is entering a few values in a web CMS with the Ranorex browser but I've already ran into a few problems.
Through Ranorex Spy I can see a few of the elements are '/input' field and I am able to user Set Value to enter values against these field. The first issue is that the page does not dynamically update or register that any information has been entered into the field (eg. The character count is not updated & save button is still disabled). Is there any reason for this? I can user a work around but I'm interested to know.
The second issue I've encounters is not all the text fields are '/input' ones, a few fields are shown with '/div' tags and I'm unable to enter values against them. If I use Set Value then Ranorex thinks I've entered a value & the test passes but no value appears on the iPad. I've also tried PressKeys but that resulted in a "Method not supported" error.
Has anyone experienced a similar issues or able to advise on how to fix (or workaround) this issue?
Thanks
I'm currently attempting to automated the creation of a post on our website and the first stage is entering a few values in a web CMS with the Ranorex browser but I've already ran into a few problems.
Through Ranorex Spy I can see a few of the elements are '/input' field and I am able to user Set Value to enter values against these field. The first issue is that the page does not dynamically update or register that any information has been entered into the field (eg. The character count is not updated & save button is still disabled). Is there any reason for this? I can user a work around but I'm interested to know.
The second issue I've encounters is not all the text fields are '/input' ones, a few fields are shown with '/div' tags and I'm unable to enter values against them. If I use Set Value then Ranorex thinks I've entered a value & the test passes but no value appears on the iPad. I've also tried PressKeys but that resulted in a "Method not supported" error.
Has anyone experienced a similar issues or able to advise on how to fix (or workaround) this issue?
Thanks
Re: Set Value/Press Keys on iPad using Ranorex browser
Hi,
As for the first issue, this is usually caused by the fact the SetValue does not trigger keyboard-based events assigned to the element in question (typically onkeypress event). In other words, you will have to use PressKey method instead of SetValue.
As for the second issue, could you please post a Ranorex Snapshot of the problematic elements?
As for the first issue, this is usually caused by the fact the SetValue does not trigger keyboard-based events assigned to the element in question (typically onkeypress event). In other words, you will have to use PressKey method instead of SetValue.
As for the second issue, could you please post a Ranorex Snapshot of the problematic elements?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 13
- Joined: Wed Oct 28, 2015 3:54 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
Thanks for the quick reply, I thought that might be why the Save button didn't activate for the first part of my problem; I tried using PressKeys and entering a value but I also got the "Method not supported" error for that as well.
I've added a Snapshot of the elements. The one I seen to be having issues with is: /mobileapp[@title='ranorex.RxBrowser']/form/?/?/dom/body/div[3]/?/?/div/section/form[@name='articleBuilder']/div/div/div[2]/tag[@tagname='input-content-editable']/div/div[2]
The two input elements below it accept values when I use SetValue but none of them seem to accept values via the PressKeys method.
Thanks again,
I've added a Snapshot of the elements. The one I seen to be having issues with is: /mobileapp[@title='ranorex.RxBrowser']/form/?/?/dom/body/div[3]/?/?/div/section/form[@name='articleBuilder']/div/div/div[2]/tag[@tagname='input-content-editable']/div/div[2]
The two input elements below it accept values when I use SetValue but none of them seem to accept values via the PressKeys method.
Thanks again,
Last edited by steven.fitzpatrick on Wed Mar 02, 2016 11:43 am, edited 1 time in total.
Re: Set Value/Press Keys on iPad using Ranorex browser
Divs should not be used as input elements. This appears to be a bug in the page.
Ranorex only allows certain functions on certain element types. If your element type doesn't support the selected action, then you get that error.
Have your developers fix the element tag to be an appropriate tag type and that will allow Ranorex to identify and allow the right actions on the element.
Ranorex only allows certain functions on certain element types. If your element type doesn't support the selected action, then you get that error.
Have your developers fix the element tag to be an appropriate tag type and that will allow Ranorex to identify and allow the right actions on the element.
Shortcuts usually aren't...
-
- Posts: 13
- Joined: Wed Oct 28, 2015 3:54 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
Thanks for the info, I had wondered why two of the tags were different from the rest but thought Ranorex would be able to send keys regardless.
Thanks for the help, it's been raised so hopefully I'll get an update soon & get it working.
Cheers
Thanks for the help, it's been raised so hopefully I'll get an update soon & get it working.
Cheers
-
- Posts: 13
- Joined: Wed Oct 28, 2015 3:54 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
I'm still waiting on certain div tags being updated to inputs by our developers but I've encountered an issue with using PressKeys again. I mentioned this in my original post but I have an input tag that I am able to set a value on but as was mentioned already, this doesn't trigger a keyboard event and as a result the 'Search' button on the site I'm testing remains disabled.
When I attempt to use PressKeys to send test to this input field then the test fails and Ranorex give me a "Specified method is not supported" error.
Does anyone know why this error appears or if there is a workaround for it? I'd initially thought I could just update another search field at the same time to enable the search button but when I do that then hit search, the original value (entered by SetValue) is not taken into account.
any help would be appreciated. Cheers
When I attempt to use PressKeys to send test to this input field then the test fails and Ranorex give me a "Specified method is not supported" error.
Does anyone know why this error appears or if there is a workaround for it? I'd initially thought I could just update another search field at the same time to enable the search button but when I do that then hit search, the original value (entered by SetValue) is not taken into account.
any help would be appreciated. Cheers
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Set Value/Press Keys on iPad using Ranorex browser
Hello Steven,
First, you have to make sure that the keyboard is visible at the moment you execute the Mobile Key Press action.
I assume that the action is executed for the wrong repository item. I would suggest executing the action on the mobileapp-item directly.
Please let me know if this solves the issue.
Sincerely,
Johannes
First, you have to make sure that the keyboard is visible at the moment you execute the Mobile Key Press action.
I assume that the action is executed for the wrong repository item. I would suggest executing the action on the mobileapp-item directly.
Please let me know if this solves the issue.
Sincerely,
Johannes
You do not have the required permissions to view the files attached to this post.
-
- Posts: 13
- Joined: Wed Oct 28, 2015 3:54 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
Hi,
I've attempted your suggested steps but that's not exactly what I'm looking for. I'm attempting to enter a text value in an input field (eg. "Hello World") with the PressKeys("Hello World") user code rather than use the Mobile Key Press(Enter) as shown in your screenshot.
I've made sure the keyboard is visible before trying PressKeys with user code as follows:
then I've tried each of the following in turn but none seem to work:
1)
2)
3)
4)
Is there anyway to use the user code - PressKeys("Hello World"); - when testing on a mobile device, or failing that, is there anyway to get SetValue to be resisted on the page when I then go to search?
Thanks,
Steven
I've attempted your suggested steps but that's not exactly what I'm looking for. I'm attempting to enter a text value in an input field (eg. "Hello World") with the PressKeys("Hello World") user code rather than use the Mobile Key Press(Enter) as shown in your screenshot.
I've made sure the keyboard is visible before trying PressKeys with user code as follows:
Code: Select all
repo.Browser.Dom.HeadlineField.Touch();
Delay.Milliseconds(2500);
1)
Code: Select all
repo.Browser.PressKeys("Hello World");
//This give a "Browser.AppFolder does not contain definition for PressKeys" error
Code: Select all
repo.Browser.Self.PressKeys("Hello World");
//This gives a "Can't synthesize key sequence <Hello World> because current active keyboard doesn't support it" error.
Code: Select all
repo.Browser.Dom.Self.PressKeys("Hello World");
//Same error as #2
Code: Select all
repo.Browser.Dom.HeadlineField.PressKeys("Hello World");
//Gives a "Specified method is not supported" error.
Thanks,
Steven
-
- Posts: 2
- Joined: Tue May 10, 2016 4:08 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
Hi Ranorex Support Team,
I am also facing this issue for one of our projects. Can you please help us with the resolution on this? I am facing exact same issue which steven specified.
Thanks,
Pavan
I am also facing this issue for one of our projects. Can you please help us with the resolution on this? I am facing exact same issue which steven specified.
Thanks,
Pavan
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Set Value/Press Keys on iPad using Ranorex browser
Hello Pavan,
May I ask if you have the issue with the UITextField? The following bug was fixed in our new major release Ranorex 6.0:
Please let me know if this resolves the issue.
Sincerely,
Johannes
May I ask if you have the issue with the UITextField? The following bug was fixed in our new major release Ranorex 6.0:
- Setting an attribute value on iOS UITextField controls now triggers delegates registered on the control.
Please let me know if this resolves the issue.
Sincerely,
Johannes
-
- Posts: 2
- Joined: Tue May 10, 2016 4:08 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
Yes Johannes. The issue is with the UITextField. I will download the latest Ranorex setup and test it.
Although, i had done a work around which worked for me. Here is the code i am using now...
txtSearchBox.PressKeys(" ");
txtSearchBox.TextValue="test data";
Delay.Seconds(5);
txtSearchBox.Focus();
txtSearchBox.PressKeys("{ENTER}");
Although, i had done a work around which worked for me. Here is the code i am using now...
txtSearchBox.PressKeys(" ");
txtSearchBox.TextValue="test data";
Delay.Seconds(5);
txtSearchBox.Focus();
txtSearchBox.PressKeys("{ENTER}");
-
- Posts: 7
- Joined: Tue Mar 28, 2017 7:51 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
Hello,
I'm using Ranorex 6.2.1 with an Android Hybrid app and I'm facing a similar issue. I need to enter text in the password field in order for the Login button to become clickable. The text seems to get entered, but the Login button is not becoming clickable. The Mobile Key Press actions against the password field element (tried PressKeys() via code as well) all seem to return method not supported event if the device keyboard is up.
Is there any way around this? If I could get PressKeys() to work perhaps this would
I read somewhere else that there may be a way to trigger onBlur() but I have not been able to figure that out.
Any suggestions are most appreciated.
Note -> I'm new to Ranorex, but have used other automation solutions such as Selenium, Telerik Test Studio and UFT.
I'm using Ranorex 6.2.1 with an Android Hybrid app and I'm facing a similar issue. I need to enter text in the password field in order for the Login button to become clickable. The text seems to get entered, but the Login button is not becoming clickable. The Mobile Key Press actions against the password field element (tried PressKeys() via code as well) all seem to return method not supported event if the device keyboard is up.
Is there any way around this? If I could get PressKeys() to work perhaps this would
I read somewhere else that there may be a way to trigger onBlur() but I have not been able to figure that out.
Any suggestions are most appreciated.
Note -> I'm new to Ranorex, but have used other automation solutions such as Selenium, Telerik Test Studio and UFT.
-
- Posts: 7
- Joined: Tue Mar 28, 2017 7:51 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
I was able to work around this by sending the keyPress actions to the top level item in the Dom (performed a space then a delete after the password value was set).
Unfortunately the original problem of setValue not triggering onBlur or onChange once the text is entered is still an issue.
Thanks,
Matt
Unfortunately the original problem of setValue not triggering onBlur or onChange once the text is entered is still an issue.
Thanks,
Matt
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Set Value/Press Keys on iPad using Ranorex browser
Hi Matt,
This is a known issue and there's already an entry in our internal bug tracking system.
Currently, we do not know if and when this issue will be fixed. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.
In the meantime, I would suggest using the workaround that you have already mentioned. I’m afraid there is no other workaround at the moment.
Thank you for your understanding.
Sincerely,
Johannes
This is a known issue and there's already an entry in our internal bug tracking system.
Currently, we do not know if and when this issue will be fixed. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.
In the meantime, I would suggest using the workaround that you have already mentioned. I’m afraid there is no other workaround at the moment.
Code: Select all
//Set the value
repo.MobileApp.Input.Element.SetAttributeValue("Value", "TestValue");
//Create a space in order the value will be applied
repo.MobileApp.Self.PressKeys("{SPACE}");
//Delete the not needed space
repo.MobileApp.Self.PressKeys("{DEL}");
Sincerely,
Johannes
-
- Posts: 7
- Joined: Tue Mar 28, 2017 7:51 pm
Re: Set Value/Press Keys on iPad using Ranorex browser
Unfortunately this workaround that is successful on Android does not seem to be working on iOS. I see the following error: "Cannot synthesize keysequence <{SPACE}> because the current active keyboard doesn't support it. "
I tried doing ENTER instead, and did not see the error mentioned above, but the input text was still not recognized unfortunately.
Any suggestions on how to proceed for iOS?
I tried doing ENTER instead, and did not see the error mentioned above, but the input text was still not recognized unfortunately.
Any suggestions on how to proceed for iOS?