In this article we are going to see how to click /press long. It is a spatial event like as clicking. Android provide separate event handler for long press. Ex- when we press on screen long time(3s+), the menu comes.

We need to initiate the Solo object. After initiation, we will uses solo to get those.

-To Long click on specific list line of a text view. It returns an ArrayList of the TextView objects (contains the lines). It will get the first ListView that it finds.
solo.clickLongInList(0);

-To Long click on specific list line of a text view and the index. It returns an ArrayList of the TextView objects (contains the lines).
solo.clickLongInList(1,0);

-To Long click on specific list line of a text view , the index and the amount of time (long press time in millisecond integer) . It returns an ArrayList of the TextView objects (contains the lines).
solo.clickLongInList(2, 1,5);

-To Long click on specific coordinate X, Y. This coordinate is the resolution of the screen.Ex-480x800, here X=480(max) and Y=800(max) in portrait mode.
solo.clickLongOnScreen(240, 400);

-To Long click on specific coordinate X, Y and the amount of time (long press time in millisecond integer)
solo.clickLongOnScreen(240,400,5);

-To Long click on a View/Web Element displaying a specific text. It will automatically scroll.
solo.clickLongOnText("TextToClick");

-To Long click on a View/Web Element displaying a specific text and the index for multiple match. It will automatically scroll.
solo.clickLongOnText("Regix", 0);

-To Long click on a View/Web Element displaying a specific text , the index for multiple match and scroll Boolean value . Provide true when if we need to enable scrolling.
solo.clickLongOnText("Regix", 0, true);

-To Long click on a View/Web Element displaying a specific text , the index for multiple match and the amount of time (long press time in millisecond integer)
solo.clickLongOnText("Regix", 0, 5);

-To Long click on specific text and then selects an item(index) from the context menu that appears. It will automatically scroll.
solo.clickLongOnTextAndPress("Regix", 1);

-To Long click on specific view. In here myView is a view object.
solo.clickLongOnView(myView);

-To Long click on specific view and the amount of time (long press time in millisecond integer)
solo.clickLongOnView(myView, 5);

Thanks...:)