and everyone in this session I am going
to explain the interview question how to
get type of text from a text box field
okay how to get the type of text now
make Xbox field let me explain this
for example this is application grace
let's say there is a text box filled
here if I type some text here using
selenium if I type some text into this
text box field data point of time I want
to retrieve this text that have type
into the Xbox field how to do this okay
how to do this so the reasoning behind
this is like so when you inspect this
thing okay when you inspect this text
box field can observe that there is a
value attribute here okay okay when you
had to put is empty now but when you
type the text into this internally its
value attribute will have here Fox as
its own is the type that takes 30 of
times here will be the value of this
value attribute so if you retrieve this
particular value of this value attribute
then you will get the text at what type
into the next phosphate so what is the
command that we have to use for
retrieving the text of evaluator Buddhas
when you have a value attribute you have
to use get attribute command guys in
that you have to pass a attribute claim
that is ready so that you will get the
value of that brandy attribute of that
element okay so how to get the type of
text from a textbook field using gate
attribute command well let me
practically demonstrate ways let's say I
have navigated to this application in
the Chrome browser after that whatever
do is the next step that I will do here
is I would like to it will be like this
guy so I will I would like to type text
into this text box field okay by default
there is no text inside this textbook
speed I would like to type some text
into the next one I will inspect this
and this particular thing has a name
identifier look at this so I will copy
the value of this name and I will say
driver dot find element by dot name
here I'll say Q dot I'll say say
indicator and type the text first okay
Here I am typing the text first
okay I'm typing here Fox s text once I
type the text okay next we'll be typing
like this write this value okay whatever
you have typed will be stored into this
land you attribute internally it may not
be short
you know but it will distort internal
into this value attributed what I have
to do is again say if I would not find
element after typing the text here in to
this Expo split up again I will say the
same across field okay that is I would
find a find element by dot name without
the name of you okay which refers to the
same element now here I will apply
attribute comment okay it attribute but
which value of each attribute how do we
prove the value of can you attribute a
value attribute yeah we have a value
attribute I want to retrieve its value
this will store this particular text
that you have typed in the previous
statement okay then a foreign so it will
return something ring takes retrieve
okay x51 is equal to this will be
retrieving the text we stamp dot out dot
println let me copy paste this text it
root here okay finally often after
printing the reputation quit the browser
right click run as java keishon
see the class is running
the browser will launch first it will
type here 4/6 into that xbox field you
see you see and then it will retrieve
the test that got typed into the textbox
field using the gate attributes command
guys okay this great attributes command
using the value attribute name as a
retrieve the text that is stored into
that Xbox wheel and printed it here okay
this is how you can use this is how you
can retrieve the text that got type into
a text box field okay so that's it guys
thank you bye