I have devoleped a simple iOS app and on test using Appium all the UIControls staus is shown as visibility false. The below image is the screenshot of the test. I set accessibility label on storyboard
The code I wrote for a simple textfield is given below.
self.txt_txt.isAccessibilityElement = YES;
self.txt_txt.accessibilityElementsHidden=NO;
I have done a little R&D on this and haven't found anything keep 'visibility ' true for UIControls.How to keep visibility true in the above case.If not in code are there any other scripts to run?. Any thoughts are welcome.
I believe this is a bug when using iOS8, based on the information shown in the Appium bug database here:
https://github.com/appium/appium/issues/4131
Looking at the last comment to this bug, it seems that in iOS7 elements are correctly identified as "visible: true", but the same ones in iOS8 are not.
As far as I understand it, at the moment it's not yet clear if this is a bug in Appium or in iOS8.
Related
I was creating a simple app in Xcode 8.1 with swift 3 and I got this problem (picture): dashes under buttons symbols.
How can I fix this issue?
Thanks.
So Nirmit dagly (https://stackoverflow.com/users/3401707/nirmit-dagly) has given the exact solution and it works perfectly.
He says: "You need to check button style on your iPhone device's setting. To check please go to General -> Accessibility -> Button Shapes. If it is enabled, then make it disable and run the app again. It'll hide the underlines from buttons."
I do thank him for his helpful answer and I has republish it here for the benefit of others.
Thank you again Nirmit and I prefer if we can get other independent solutions(not linked to the parameters of the phone user.).
I'm using Appium on Mac OS with iPhone 5S with operation system 9.2.
When i'm trying to hide the Keyboard with the method:
driver.hidekeyboard();
Nothing happens and the application crash.
Need help please
Thanks
Ohad
If in case your application is crashing on when you are trying to hide the keyboard, then that could be a possible bug you are looking at and to understand the cause of that and get it fixed would be the topmost recommendation. Your statement
driver.hidekeyboard();
is good enough for what you desire out of the execution assuming the driver used is AppiumDriver or its subclass.
Also if you are sure that the keyboard is displayed and you can even manually hide the keyboard, a forced way to do that is as #Gaurav has suggested in the comments using the following code :
driver.navigate().back();
In case of uncertainty of the visibility of keyboard, you can give this a try :
driver.getKeyboard();
driver.hideKeyboard();
I am NOT using auto layouts and this is how the UIDatePicker is appearing in my app on iOS 9. The picker is looking flawless in iOS 8 but the problem is only with iOS 9. Any idea how to resolve this.. (P.S using auto layouts in not a solution at the moment for me.)
In the viewDidLoad() method, change a property of the date picker, for example the mode. Note that, You don't have to leave it changed, you can set it to anything and then change it back to what you actually want.
I am sure, this solution is helps you.
In my app I use a UIPopoverController with an embedded UINaviagtionController to show a single line UITextField to enter a number. This kind of input was working up to iOS 7.1. Since iOS 8.0 the size of the UITextField is wrong. I tried out to change the AutoresizingMask, Frame, EdgesForExtendedLayout, ... but nothing is working.
As you can see in the screenshots bellow, there is a strange behaviour.
A sample project for Xamarin.iOS is available: http://www.danflash.com/files/dev/PopoverTest.zip
I have found the issue. I had to set contentViewController.EdgesForExtendedLayout = UIRectEdge.None; within the method:
public static PopoverInputController GetPopoverController(...)
It seems that Apple did some more changes to the UI regarding the layout stuff as expected.
I am testing my app with the UI Automated Testing framework. I have a UIACollectionView I would like to pull down or drag my CollectionView. I already tried the ways from the documentation:
to drag up
target.dragInsideWithOptions({startOffset:{x:0.5, y:0.9}, endOffset:{x:0.5, y:0.2}, duration:2.0});
or to pull down:
target.dragInsideWithOptions({startOffset:{x:0.5, y:0.3}, endOffset:{x:0.5, y:0.8}, duration:2.0});
when this didnt work I tried to use the inheritated methods of the UIAScrollView. chatList is my UIACollectionView
archivedChatCell = chatList.cells()["Noise"]
archivedChatCell.scrollToElementWithValueForKey(1, "isVisible")
chatList.scrollDown()
chatList.scrollToElementWithPredicate("Noise")
But nothing is moving in the screen. I read in some threads that this (dragInsideWithOptions) is a Apple problem that needs to be fixed for the iOS7 UI Testing.
Does someone have any idea what the problem is? Am I missing something or is there a work around for that?
The weird thing is, I am using the same code in a different CollectionView in my App, the dragInsideWithOptions works fine and drags or pulls the screen.
thank you
Yes, dragInsideWithOptions and flickInsideWithOptions are not working on the simulator. However, they do work on a real device. Therefore, my suggestion is to use a real device until Apple fixes the problem.