Comments (14)
Hi, Chris,
I tried with 1.14.1 and the scroll to text is working now on both my S10e and another device I tried (a Pixel). Thanks!
Stephanie
from katalon-mobile-util.
Thanks for the input @scsmith5593 , I'll take a look and see if I can replicate it on Android 10.
from katalon-mobile-util.
Hi @scsmith5593 , I was still able to use Scroll.scrollListToElementWithText
using a Samsung Galaxy S8 emulator with Android 10.0. Specifically, I'm using the function where you pass in the resource_id of the type of elements you want to scroll through: Scroll.scrollListToElementWithText('state_label', 'Michigan', timeout)
.
Can you please provide the function call and parameters you're using? Can you also confirm which version of katalon-mobile-util you're using?
Thanks!
from katalon-mobile-util.
Hi,
This is my call and parameters:
Scroll.scrollListToElementWithText('Contact Us', 0)
I also tried passing in the resource-id the way you are doing:
Scroll.scrollListToElementWithText('about_button', 'Contact Us', 0)
But that produced the same results for me--no scrolling. I'm using a real device (Samsung s10e) in case that makes a difference.
My version of katalon-mobile-util is 1.14.0.
Thanks!
from katalon-mobile-util.
Hi @scsmith5593 ,
I'd like to see what the utility thinks is on the screen at the time of the scrolling. Could you try adding the following to your test:
In the import statement:
import com.detroitlabs.katalonmobileutil.logging.Logger
import com.detroitlabs.katalonmobileutil.logging.Logger.LogLevel
Then at the top of the test (or at least before you do the scrolling):
Logger.initialize('output.log', LogLevel.DEBUG)
That should add lines to output.log
in your test directory that give more info on what's going on with the scrolling. If you could attach that file here, that will help troubleshooting.
If you have any problems getting the logging to work, please let me know.
from katalon-mobile-util.
Hi, @ctrevarthen,
Done and attached.
output.log
from katalon-mobile-util.
Thanks @scsmith5593 thatโs helpful. It looks like the code stops right on the first scroll attempt. Iโm wondering if it has anything to do with the bottom element that shows in the list (Work at Transit) being slightly too low for the touch gesture. Any chance you could send the same log for an Android 9 device where the scrolling is working?
Oh, and are there any errors in the Katalon Console?
Thanks,
Chris
from katalon-mobile-util.
Hi, Chris,
Here's the output log for the Android 9 device.
output.log
I do see an error in the Katalon Console but I expect it's because the screen did not scroll so it can't find the intended object. In case I'm wrong, here it is:
Test Cases/Debug_Support_TC FAILED.
Reason:
org.openqa.selenium.InvalidArgumentException: Coordinate [x=186.0, y=2050.0] is outside of element rect: [0,0][1080,2020]
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'Stephanies-MBP.localdomain', ip: 'fe80:0:0:0:cdf:c475:679f:df41%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_181'
Driver info: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver
Capabilities {adbExecTimeout: 10000, allowTestPackages: true, app: /Users/stephaniesmith/proje..., appPackage: com.thetransitapp.alphadroid, appWaitActivity: *, appWaitPackage: com.thetransitapp.alphadroid, autoGrantPermissions: true, automationName: uiautomator2, chromeOptions: {w3c: false}, databaseEnabled: false, desired: {adbExecTimeout: 10000, allowTestPackages: true, app: /Users/stephaniesmith/proje..., appWaitActivity: *, appWaitPackage: com.thetransitapp.alphadroid, autoGrantPermissions: true, automationName: uiautomator2, chromeOptions: {w3c: false}, deviceId: , deviceName: samsung SM-G970U1 (Android 10), dontStopAppOnReset: true, fullReset: false, newCommandTimeout: 1800, noReset: true, platform: ANDROID, platformName: android, platformVersion: 10, systemPort: 56900, udid: R58MB4EKH7H, useKeystore: true}, deviceApiLevel: 29, deviceId: , deviceManufacturer: samsung, deviceModel: SM-G970U1, deviceName: R58MB4EKH7H, deviceScreenDensity: 480, deviceScreenSize: 1080x2280, deviceUDID: R58MB4EKH7H, dontStopAppOnReset: true, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 1800, noReset: true, pixelRatio: 3, platform: ANDROID, platformName: Android, platformVersion: 10, statBarHeight: 117, systemPort: 56900, takesScreenshot: true, udid: R58MB4EKH7H, useKeystore: true, viewportRect: {height: 1903, left: 0, top: 117, width: 1080}, warnings: {}, webStorageEnabled: false}
Session ID: 629ad9a8-3e29-4037-b695-921bbb1ef251
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)
at io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)
at io.appium.java_client.TouchAction.perform(TouchAction.java:187)
at com.detroitlabs.katalonmobileutil.touch.Scroll.scrollEntireList(Scroll.java:256)
at com.detroitlabs.katalonmobileutil.touch.Scroll.scrollListToElementWithXPath(Scroll.java:193)
at com.detroitlabs.katalonmobileutil.touch.Scroll.scrollListToElementWithText(Scroll.java:131)
at com.detroitlabs.katalonmobileutil.touch.Scroll.scrollListToElementWithText(Scroll.java:102)
at com.detroitlabs.katalonmobileutil.touch.Scroll$scrollListToElementWithText.call(Unknown Source)
at Debug_Support_TC.run(Debug_Support_TC:31)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1583936927382.run(TempTestCase1583936927382.groovy:23)
from katalon-mobile-util.
HI @scsmith5593 ,
On the Galaxy s10e, is it correct that you're not seeing the list scroll at all?
It is weird in the logs that I don't see anything about the scrolling attempt finishing on the s10e, like we see with the older phone. I'm wondering if the touch interactions are working at all. When you get a chance, could you please try using the Swipe.swipe
command (instead of the scrollListToElementWithText
just to see if any sort of touch movement works?
In the import statements:
import com.detroitlabs.katalonmobileutil.touch.Swipe
import com.detroitlabs.katalonmobileutil.touch.Scroll.ScrollFactor
import com.detroitlabs.katalonmobileutil.touch.Swipe.SwipeDirection
And the Swipe command (instead of scrollListToElementWithText
)
Swipe.swipe(SwipeDirection.BOTTOM_TO_TOP)
I'd like to know if you see the screen scroll at all.
Thanks,
Chris
from katalon-mobile-util.
Hi, @ctrevarthen,
Correct, I do not see the list scroll at all on the S10e.
I put in the swipe command as you suggested and gave it a try. That works successfully; I see the screen swipe to the bottom.
from katalon-mobile-util.
Thanks @scsmith5593 ! That tells me that scrolling should work (both Swipe and Scroll use the same underlying Appium functions) but maybe there's a literal edge case with the way the screen size/scroll start position is happening.
I'll work on an update to try to account for that. In the meantime, it's not ideal, but a loop of swiping and checking for the text element might work for you.
from katalon-mobile-util.
@ctrevarthen Thanks, I'll try using swipe for now.
from katalon-mobile-util.
Hi @scsmith5593 ,
Looking at the error message you posted, again, and it's definitely an issue with the device dimensions not matching the objects detected on the screen: Coordinate [x=186.0, y=2050.0] is outside of element rect: [0,0][1080,2020]
. I'm not really sure how this could happen, but maybe it's a problem between the device and Appium.
I put up a release for katalon-mobile-utl 1.14.1 (https://github.com/detroit-labs/katalon-mobile-util/releases/tag/1.14.1) which tries a couple of different ways to get around this issue when using Scroll.scrollListToElement()
. If you could try it and let me know it works, I would appreciate it.
Thanks,
Chris
from katalon-mobile-util.
Marking as resolved with 1.14.1.
from katalon-mobile-util.
Related Issues (20)
- Add a way to better handle push notifications
- Unable to import com.detroitlabs.katalonmobileutil.testobject.Finder HOT 2
- Implement scrolling a drop-down list to a specific index for Android
- Add element color detection
- Add sample iOS and Android apps and test cases using the library
- Add convenience method(s) for editing system settings
- JAR file does not contain latest Scroll&Swipe update HOT 1
- Scroll covers too small area (half a screen) HOT 4
- Unable to remove app before test HOT 6
- findLabelAtIndex with iOS sets type "XCUIElementTypeStaticText" HOT 4
- Handle One-time Passwords (OTP)
- Handle tapping of buttons in WebViews
- Closing keyboard doesn't account for multiple "Done" buttons
- Control scroll direction for scrollListToElementWithText
- Add application back button handling for iOS
- Update handling of submit buttons on iOS keyboards
- NoSuchMethodError being thrown for ScrollListToElementWithText in Katalon 7.0.8 HOT 2
- Add convenience option to press Home button
- Textfield.typeText occasionally inputs wrong value HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from katalon-mobile-util.