How to scroll in iOS app using selenium-appium - scroll

How to scroll in iOS application? Scenario is the following: I need to scroll down the page and need to Tap on the iOS app element I am using Appium with selenium Webdriver ios automation.

There are two thing you should do:
First, find the element and tap on it. This should scroll automatically.
Second, in case first one doesn't work. Find the x andy coordinates using inspector and use Driver.scrollTo();

Related

Need a alternative to Appium Inspector to view xpath of ios app elements, appium inspector is not getting refreshed

Need a alternative to Appium Inspector to view xpath of ios app elements, appium inspector is not getting refreshed ,so that i need to restart the inspector every time to work ,and when connecting its very slow , kindly suggest me alternative .

How to acces all UI elements from CarPlay with Xcode UI Recording?

Why can the UI recording from Xcode accces elements like the status bar from CarPlay but not the other elements like the buttons on the map or buttons in an navigation alert?
XCTest built-in recorder is not designed to record interactions with CarPlay display properly.
You should probably inspect elements with an Accessibility Inspector or app.debugDescription

clicking a NSToolbarItem in XCTest UI Testing

I'm writing UI Tests for a document-based macOS app.
In a UI Test, how can I click on an NSToolbarTiem in a localization friendly way?
Recording doesn't record anything when I click on one.
NSToolbarItem doesn't seem to have an accessibilityIdentifier.
You should inspect elements tree print(app.debugDescription)
Find your element and click with something like app.toolbars["brushes"].firstMatch.click()
If accessibilityIdentifier and label are missing, add them in application code or storyboard.

Toolbar fades out after a second in iOS 11

I'm just starting out on a new app with Xcode 9 and iOS 11. I placed a Toolbar at the bottom of the view, then added suggested constraints. Inside the toolbar I placed two buttons, "Sites" and "Item".
When I run the application, the toolbar disappears after a second whenever I launch the app.
Any idea what's causing this? How do I fix it? There's currently no code added to it, just the elements I've mentioned.
You are putting the elements on the launch screen instead of the actual first screen of the application.
If you are using the default configuration, search for the storyboard called Main.storyboard and put the items you want to show there.

Apple Watch app scroll the view to top programmatically after launching app

I need to scroll to top the main Interface Controller of an Apple Watch app programmatically after each launch specially if users has left the app after scrolling it down.
EDIT:
This is now possible in watchOS 4. Just use the scrollToObject:atScrollPosition:animated: method.
Unfortunately, this isn't currently possible. WatchKit only provides a method to scroll to the top of a WKInterfaceTable, not an entire interface controller.
The only workaround I've found is to hide every element in the interface controller. This doesn't just hide the element, it completely removes it from the controller. Then when you unhide everything, you'll be back at the top of your content.

Resources