Git Product home page Git Product logo

Comments (11)

renas avatar renas commented on July 19, 2024

From [email protected] on August 30, 2010 11:29:11

Addding views to HorizontalScrollView

from robotium.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

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.

renas avatar renas commented on July 19, 2024

From [email protected] on August 31, 2010 21:30:52

According to functionality..

Status: Invalid

from robotium.

renas avatar renas commented on July 19, 2024

From [email protected] on September 02, 2010 06:11:43

It worked like charm. Awesome.
Thank you

from robotium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.