Unable to find text

69 views
Skip to first unread message

sunny sachdeva

unread,
Jun 5, 2020, 5:48:04 AM6/5/20
to Selenium Users
HI ,

I am trying to get text from the input box whose HTML is

<div class="dijitReset dijitInputField dijitInputContainer"><input class="dijitReset dijitInputInner" data-dojo-attach-point="textbox,focusNode" autocomplete="off" type="text" tabindex="0" aria-required="false" id="MLUIWidget_28_19_141" value="" aria-invalid="false" aria-disabled="false"></div>

Issue is I can't find where the value 30 is stored, pls see attachment?

Tried by getText(), getAttribute(''value"),getAttribute(''innerText"),getAttribute(''textContent"),getAttribute(''outerText")
Screenshot 2020-06-05 at 14.46.54.png

Josh Abrahamsen

unread,
Jun 5, 2020, 7:51:03 AM6/5/20
to seleniu...@googlegroups.com
Did you try just element.value?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4bf515f0-6d41-4420-8325-f4439f006dd3o%40googlegroups.com.

Hanumantha Reddy

unread,
Jun 5, 2020, 9:07:54 AM6/5/20
to Selenium Users
Hi Sunny,

You are trying to read value from input element. So you have to use the following code,

String value=driver.findElement(By.tagName("img")).getAttribute("MLUIWidget_28_19_141");
you will get the value in value variable.
For more details you can follow the below video.

Joe Ward

unread,
Jun 5, 2020, 10:33:23 AM6/5/20
to seleniu...@googlegroups.com

Hanumantha how come every reply you post contains a link to a YouTube video for Ankpro Training? Do you need to disclose your interest in that company or something?


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

Villju Joseph

unread,
Jun 6, 2020, 12:30:55 AM6/6/20
to seleniu...@googlegroups.com
Try javascript executor 
document.getElementById().value

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages