Comments (11)
From [email protected] on August 30, 2010 11:29:11
Addding views to HorizontalScrollView
from robotium.
From [email protected] on August 30, 2010 23:10:25
So basically the button is not shown when you want it to be clicked? Robotium tries to emulate a real user so therefore if it can not reach the button (hidden) it will not be able to click it. You should use scrollToSide() before you use clickOnView()/clickOnButton().
from robotium.
From [email protected] on August 31, 2010 10:33:31
I tried it but i have one more scroll view before my HorizontalScrollView on the screen.When i try to do scrollToSide() it happens to first scroll view not to the
second one where my hidden button is.
Or How to scroll specifice ScrollView if there are more than one on screen.
from robotium.
From [email protected] on August 31, 2010 11:05:40
Use drag() instead, then you can define yourself how it should drag the screen. You might need to use 2 drags after eachother. There is functionality to choose which list to scroll but not which scroll view to scroll.
from robotium.
From [email protected] on August 31, 2010 11:33:33
My HorizontalScrollView is very bottom of the screen and my hidden button is far right in the scroll view , when i use drag(0,-50,0,0,10) nothing happens.
I am thinking this will move scrollview 50 units left from 0 in x direction and keep y the same.
from robotium.
From [email protected] on August 31, 2010 11:53:25
You should write:
int screenWidth = solo.getCurrentActivity().getWindowManager().getDefaultDisplay().getWidth();
drag(0,width -10,0,0,10) //-10 or more depending how far in the right it should start to drag.
from robotium.
From [email protected] on August 31, 2010 11:57:42
it should be:
drag(width -10,10,20,20,10) //You want to start the drag from the right. The 20 is where the dragging in y should start which should be depending on your screen height.
from robotium.
From [email protected] on August 31, 2010 12:35:11
i get below error when i tried your idea.
check this link how my HorizontalScrollView look like https://code.google.com/p/mobyfactory-uiwidgets-android/ 08-31 15:31:21.435: INFO/TestRunner(2367): junit.framework.AssertionFailedError: Application can not be dragged!
08-31 15:31:21.435: INFO/TestRunner(2367): at junit.framework.Assert.fail(Assert.java:47)
08-31 15:31:21.435: INFO/TestRunner(2367): at junit.framework.Assert.assertTrue(Assert.java:20)
08-31 15:31:21.435: INFO/TestRunner(2367): at com.jayway.android.robotium.solo.Scroller.drag(Scroller.java:70)
08-31 15:31:21.435: INFO/TestRunner(2367): at com.jayway.android.robotium.solo.Solo.drag(Solo.java:756)
from robotium.
From [email protected] on August 31, 2010 13:04:56
try this:
int height = solo.getCurrentActivity().getWindowManager().getDefaultDisplay().getHeight();
drag(width -30,20,height-30,height-30,40);
from robotium.
From [email protected] on August 31, 2010 21:30:52
According to functionality..
Status: Invalid
from robotium.
From [email protected] on September 02, 2010 06:11:43
It worked like charm. Awesome.
Thank you
from robotium.
Related Issues (20)
- update repository description URL
- Build error with JavaCompile.setDependencyCacheDir() HOT 4
- Recording failed; Build failed with an exception HOT 3
- Links to PDF tutorials are broken
- Application not launch on test started HOT 4
- ClickOnScreen Not working
- ClickOnwebElement not working
- Build failed: Could not find :ExecutorLibrary: HOT 3
- Is Robotium dead? HOT 4
- CLick on TwoWayView, Viewpager
- robotium typetext wrong order HOT 2
- Cannot find Activity class on Android7.0 HOT 1
- Can't open Javadoc HOT 1
- assertFalse does not work on Android Oreo 8.1 HOT 1
- [QUESTION] Where I can find the CI service?
- Robotium Recorder : Please install a compatible Android API level (15 or higher) HOT 2
- Image validation in mobile native app HOT 2
- Robotium to work with targetSdkVersion 30
- Could not find manifest file within jar
- Could find http://recorder.robotium.com/updates
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 robotium.