UITableView gets muddled when using Ranorex Automation - ios

I am running automated tests on an IOS Application using Ranorex Studio.
The test loads a form, fills it out, and saves it.
I am getting varied results.
Field headings disappear as data is entered.
Data already entered disappears as more data is entered.
On date picker fields, the Done button sometimes disappears.
These problems only occur during automation, but Ranorex maintain that their automation does not change anything within the application.
There appears to be something completely random about what the UITableView decides to show.
Any ideas how I can resolve this?
Example: Section of log
Screenshot before entering phone number
Screenshot after touching phone number field. Note: Field labels & required graphic (a red circle) are now missing.
Snapshot before entering phone number
Snapshot after touching phone number

Related

Replaying page on iOS app

I am making an iOS app through xcode for audits where each room in a building uses the same page format but has different information. How can I replay the same page over through an add bar button so that when the add button is pressed the same page comes up but with all the text fields empty.
I assume when you are done putting in the information, you must be saving the information in the local DB or any server may be.
What you can do is, once you are done with putting in all the information display an alert stating that the information is saved and upon the clicking on any button on the alert, clear all the fields.

Ionic Keyboard doesn't work on input / textarea fields in Salesforce1 on iOS

I'm developing a mobile web app using Ionic and Salesforce1. One part of my app has a super simple form (2 inputs and a text area). The form works great on every device and browser except for within Salesforce1 on iOS. When I tap to focus on a any of these fields - keyboard pops up but nothing I type gets outputted to the input field or textarea.
A few observations...
It may have something to do with ionic being run inside of the Salesforce1 iframe container
It does work on mobile safari, when it is not in the salesforce1 iframe
I was able to get < input > fields working by inserting window.focus() into the top of the ionic method tapHandleFocus(ele)
Using Siri for voice input seems to work.
As I type, the keyboard will show suggested autocomplete words. If i tap these words, they are inserted into the fields as expected.
Once there is text in the field, it is possible to edit the field as expected.
My hunch/guess is that my initial tap focuses on a duplicated field that floats above/under/behind the shown (an Ionic thing). For some reasons typing individual characters isn't successfully putting the values in the shown field??
Let me know if there's any other info I can provide to be more helpful.

Ranorex v5.0 doesn’t click button sporadical

I have a ranorex project, which automated an use case with clicking 5 buttons in an application.
To set up this project I used the record function. I defined some sleep times between the clicks.
The run with the clicks is in a loop, where the loop count is dynamically defined. One button of the five and always the same button, Ranorex "ignores" sometimes. According to the log file, the button is visible and enabled and ranorex also runs the code with the Click(), but the application doesn’t receive the click. Before in code the click is called, I check with an “If” whether the button is visible and enabled - and if the click() is called (or doesn't), I log it to ranorexlog. Sometimes the application is running through and all the clicks work and sometimes this button click is missing one or more times. It doesn’t depend on the sleep time between the clicks, because I tried long and small pause times. It doesn’t depend on the focus of the application, too, because I switched the focus several times.
Does anybody know this problem, workarounds or what I’m doing wrong?
the obvious workaround is to use Mouse.Click("{Button}") with a 0 duration rather than invoking the click event, or if you are invoking the mouse click invoke the buttons click action. (sorry since they are both named Click() i don't know which one you are using).
As to what is happening, from your description it sounds like your script is finding more than one element with the same xpath. This would cause issues with the click event because it may try to click on the element, but it's the first xpath that matches not the second. Are there any optional elements in this sequence of button clicks that appear? for instance a busy spinner with inner text of "OK" that is hidden from view when you are clicking a button on a form with inner text of "OK" would cause two elements to be found if the xpath was looking for an inner text of ok. This element that is causing may not have been caught in the recorder because it might not have been present at the time.
Another possibility if you are using Mouse.Click() (particularly if this is a website)is that it is possible your button is not actually on the screen, I know that should be taken care of by the visible check but it is visible on the dom even though it is not visible on the screen that causes issues.
I highly recommend do not use the recorder to create test suites that need to be re-runnable. It would actually be better to use the spy tool to create a repository or several repositories for the product you are testing, this way you can be sure the xpaths are all unique, which using the recorder there is no gaurantee. You can actually record with the created repository, and ranorex will attempt to find item in the repository before creating a new item, so the recorder will use this repository when creating recordings.

ios location related bug

I am seeing a weird bug that I am looking for help with.
I have an iPad iOS 7 app that allows people to fill out forms. Their entries are stored in a Sqlite database. When they reopen a form they have worked on entries they have made are redisplayed.
When the iPad goes to a new city all the entries seem to disappear. When the app is reactivated in the new location the current page appears fine, but scrolling left or right shows nothing but blank fields. The current page is also blank if you scroll away from it and back to it.
If you print or email the form while its data is not visible, the output contains all the missing data. The data also comes back if you double-press the home button, truly exit the app, and then restart it. But simply re-opening the form does not bring the data back.
When I took my Mac and iPad to a new city, the disappearing data effect happened but went away shortly after I started testing it. I don’t know whether it always goes away eventually. I didn’t test for it immediately when I got back home, and when I did start testing the bug was not happening.
Each field is backed by an object that includes a strong string property for the field’s value. The only thing I know for sure is that in forms with invisible data that string property is nil for fields that should have data. All the other field properties retain their correct values.
So far, a change in physical location is the only thing I have found that triggers this bug. My app uses location when the user gives permission, but runs fine without it. Changing the location in the simulator does not trigger the bug. I need a way to reproduce this bug but dread having to travel all over the state (or country!) just see it.
Thanks in advance for any thoughts or suggestions.

IOS 7: Two issues with MFMailComposeViewController

I used the MFMailComposeViewController a lot in the past but for some reason now there is a very strange behaviour...that creates lots of problem in the usability of the interface....
Issue #1: fields are not editable or the focus seems wrongly positioned.
I create an email to be sent with an attachment (text or pdf) and each time the controller starts the "cc/bcc/from" fields overlap and are not editable.
if i tap on the "to:" field sometimes the keyboards appears other times it doesn't ...
The "to:"field is the only one editable (in blue) but clearly the focus is not right because sometimes i can edit the email address, other times, it becomes a completely blue box (no text is visible), etc.etc.
At times the "cc:"field is expanded on a row but the tap position is not exactly right and no editing is possible.
Issue #2: the keyboards loads fast the first time, but if i close the composer and open it again, this time the keyboard takes at least 5 seconds to show up.
I tested the process on both iPad2 with IOS7 and in debug mode on Xcode 5.1 but the behaviour is always the same.
What i tried so far:
set the mail composer as first responder, each time i open it: not working
create temporary uitextfields to "pre-load" the keyboard: not working
change the modal appearance from full screen to form sheets/pagesheet/etc: not working
it seems to be memory related,at least the keyboard part, because at the beginning the App uses ~16 MBytes and the second time slightly higher (~26 Mbytes), but not big changes.
The process flow for both issues:
You tap a send button, the mail composer opens, tap in the body and the keyboard appears.(still the email fields overlaps and not editable).
You close it, you click again the send button, you do exactly the same moves but this time the keyboard does not show up , the "cc:/bcc:" fields are indented wrongly (on the left), nothing can be edited.
I have already gone through several answers/questions on this forum but nothing seems to work and this thing is really driving me mad...no more than 4 line of code (taken from Apple docs) and it does not work...
I had the same issue on ios6. (I've not tested this on ios7) Try these two methods before showing the MFMailComposeViewController,
[self.parentViewController resignFirstResponder];
And this one on the mailComposer,
[self becomeFirstResponder];
Note - This answer is for your issue #1

Resources