Re: EditText label

38 views
Skip to first unread message

naveed

unread,
May 20, 2013, 1:50:26 AM5/20/13
to robotium-...@googlegroups.com
Hi, 

I am not able to see your linked images, it seems broken. 

Yap you can get using any of the these,

getText(int index)
getText(String text, boolean onlyVisible)


Hope it will help.

-Naveed

On Sunday, May 19, 2013 11:07:46 PM UTC+5, i.del...@gmail.com wrote:
Hi everybody,
i'm trying to get something like a laber for all the EditText shown but i read that EditText hasn't got any label. 
What i'm asking is if is possilble to get the text shown before an EditText. for example in this image i want to get User Name. is it possible with Robotium (i'm using 4.1 version) ? 
thank's 

Renas Reda

unread,
May 20, 2013, 10:01:51 AM5/20/13
to Robotium Developers
Username is a TextView. You can use searchText() or getText() to get a
hold of it.

/Renas

On May 20, 10:12 am, i.dellor...@gmail.com wrote:
> I'm sorry for the image... i try to attach it...I've tryed the methods you
> wrote but i get the text inside of the EditText: what i want to get is the
> "label" of the EditText... for example in the attached img (hope now you
> can see it) i'd like to get the String "User Name", not "adm".
> thank's in advance
>
> Il giorno lunedì 20 maggio 2013 07:50:26 UTC+2, naveed ha scritto:
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > I am not able to see your linked images, it seems broken.
>
> > Yap you can get using any of the these,
>
> > *getText<http://robotium.googlecode.com/svn/doc/com/jayway/android/robotium/so...)>
> > *(int index)
> > *getText<http://robotium.googlecode.com/svn/doc/com/jayway/android/robotium/so...)>
> > *(String<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-exte...>
> >  text)
> > *getText<http://robotium.googlecode.com/svn/doc/com/jayway/android/robotium/so...)>
> > *(String<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-exte...> text,
> > boolean onlyVisible)
>
> > Hope it will help.
>
> > -Naveed
>
> > On Sunday, May 19, 2013 11:07:46 PM UTC+5, i.del...@gmail.com wrote:
>
> >> Hi everybody,
> >> i'm trying to get something like a laber for all the EditText shown but i
> >> read that EditText hasn't got any label.
> >> What i'm asking is if is possilble to get the text shown before an
> >> EditText. for example in this image i want to get User Name. is it
> >> possible with Robotium (i'm using 4.1 version) ?
> >> thank's
>
>
>
>  loginm.png
> 7KViewDownload
Reply all
Reply to author
Forward
0 new messages