how to clear value in input type text in robot framework

1,426 views
Skip to first unread message

hari kiran vankayala

unread,
Aug 29, 2019, 5:57:40 PM8/29/19
to robotframework-users
Hello,

I am new to robot framework.

Just trying to see if there is a solution to clear default value in input type text in robot framework

I tried :

input text  ${locator_name}   ${EMPTY}

Sri Hari Naidu

unread,
Aug 29, 2019, 6:59:56 PM8/29/19
to hariki...@gmail.com, robotframework-users
Clear Element Text      ${locator_name}


Thanks & Regards
P.Srihari


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/7d08e90a-85b6-46ac-aac0-1dac5f7cfb17%40googlegroups.com.

hari kiran vankayala

unread,
Aug 29, 2019, 10:59:13 PM8/29/19
to Sri Hari Naidu, robotframework-users
Tried that too, didn't work.

Thanks & Regards,
Hari.

hari kiran vankayala

unread,
Aug 29, 2019, 10:59:36 PM8/29/19
to robotframework-users
oh yeah, tried that. Did not work.


On Thursday, 29 August 2019 15:59:56 UTC-7, Sri Hari Naidu wrote:
Clear Element Text      ${locator_name}


Thanks & Regards
P.Srihari


On Fri, Aug 30, 2019 at 3:27 AM hari kiran vankayala <hariki...@gmail.com> wrote:
Hello,

I am new to robot framework.

Just trying to see if there is a solution to clear default value in input type text in robot framework

I tried :

input text  ${locator_name}   ${EMPTY}

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

Sri Hari Naidu

unread,
Aug 30, 2019, 12:01:17 AM8/30/19
to hariki...@gmail.com, robotframework-users
If possible could you send the entire code snippet?

On Fri, 30 Aug 2019 at 8:29 AM, hari kiran vankayala <hariki...@gmail.com> wrote:
oh yeah, tried that. Did not work.

On Thursday, 29 August 2019 15:59:56 UTC-7, Sri Hari Naidu wrote:
Clear Element Text      ${locator_name}


Thanks & Regards
P.Srihari


On Fri, Aug 30, 2019 at 3:27 AM hari kiran vankayala <hariki...@gmail.com> wrote:
Hello,

I am new to robot framework.

Just trying to see if there is a solution to clear default value in input type text in robot framework

I tried :

input text  ${locator_name}   ${EMPTY}

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

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/775abe02-83c0-4a50-9a7c-5c2893d8a445%40googlegroups.com.
--
Thanks & Regards
P.Srihari

hari kiran vankayala

unread,
Aug 30, 2019, 2:26:22 AM8/30/19
to robotframework-users
Hi,

Here is the html.

<div class="abcd">
<div class="abcde"><h2>some text</h2></div><div data-id="some-id">
<div data-id="input" class="classnamedd">
<label class="labell" data-id="labelss">Nameeee</label>
<input type="text" id="id-name" placeholder="plname" value="This has to be cleared" class="someclasss">
<p class="ssomee">click text</p><!-- react-empty: 52 -->
</div>


And I tried both above options.

On Thursday, 29 August 2019 21:01:17 UTC-7, Sri Hari Naidu wrote:
If possible could you send the entire code snippet?
On Fri, 30 Aug 2019 at 8:29 AM, hari kiran vankayala <hariki...@gmail.com> wrote:
oh yeah, tried that. Did not work.

On Thursday, 29 August 2019 15:59:56 UTC-7, Sri Hari Naidu wrote:
Clear Element Text      ${locator_name}


Thanks & Regards
P.Srihari


On Fri, Aug 30, 2019 at 3:27 AM hari kiran vankayala <hariki...@gmail.com> wrote:
Hello,

I am new to robot framework.

Just trying to see if there is a solution to clear default value in input type text in robot framework

I tried :

input text  ${locator_name}   ${EMPTY}

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

hari kiran vankayala

unread,
Aug 30, 2019, 2:59:37 AM8/30/19
to robotframework-users
Hi,

Here is the html.

<div class="abcd">
<div class="abcde"><h2>some text</h2></div><div data-id="some-id">
<div data-id="input" class="classnamedd">
<label class="labell" data-id="labelss">Nameeee</label>
<input type="text" id="id-name" placeholder="plname" value="This has to be cleared" class="someclasss">
<p class="ssomee">click text</p><!-- react-empty: 52 -->
</div>


And I tried both above options.

On Thursday, 29 August 2019 21:01:17 UTC-7, Sri Hari Naidu wrote:
If possible could you send the entire code snippet?
On Fri, 30 Aug 2019 at 8:29 AM, hari kiran vankayala <hariki...@gmail.com> wrote:
oh yeah, tried that. Did not work.

On Thursday, 29 August 2019 15:59:56 UTC-7, Sri Hari Naidu wrote:
Clear Element Text      ${locator_name}


Thanks & Regards
P.Srihari


On Fri, Aug 30, 2019 at 3:27 AM hari kiran vankayala <hariki...@gmail.com> wrote:
Hello,

I am new to robot framework.

Just trying to see if there is a solution to clear default value in input type text in robot framework

I tried :

input text  ${locator_name}   ${EMPTY}

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

Sri Hari Naidu

unread,
Aug 30, 2019, 3:25:26 AM8/30/19
to hariki...@gmail.com, robotframework-users
Try below....

Wait Until Element is Enabled     xpath=//input[@id='id-name']
Clear Element Text             xpath=//input[@id='id-name']

Thanks & Regards
P.Srihari


To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
--
Thanks & Regards
P.Srihari

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/ef6d4c27-00f5-4d60-90b4-5ab389a27ac4%40googlegroups.com.

hari kiran vankayala

unread,
Aug 30, 2019, 4:59:07 PM8/30/19
to Sri Hari Naidu, robotframework-users
Hi Sri,

This did not work either. Test passed as if it cleared the text but in fact default text is not cleared.

For meanwhile I tried below code, I know this is not the right way, robot framework should have some means.

[Arguments]     ${value}
${text_lenght}= Get Length ${value}
Run Keyword If """${value}""" != ''
... Repeat Keyword ${text_length} Press Key ${locator_id} \\08 #\\08 - Delete


Thanks & Regards,
Hari.

Reply all
Reply to author
Forward
0 new messages