Selenium Ide Script Inserting input data as Placeholder value

237 views
Skip to first unread message

Jerry Stejskal

unread,
May 30, 2014, 11:27:42 AM5/30/14
to seleniu...@googlegroups.com
I have a Selenium IDE script which executes input of data for the following fields
title*
message*


Problem is that the input text is writing to the field as the "placeholder" value. Has anybody encountered this problem with Selenium IDE. 

I have attached screen shot to display how input data display in the UI.

I can toggle placeholder values and disable (in about:config) in order to input data correctly but this is not best solution for scripting.


Copy of selenium script:

<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Execute_Email</td></tr>
</thead><tbody>
<tr>
<td>click</td>
<td>link=send email</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>xpath=(//img[@alt='P1'])[2]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>css=input#subject.input-block-level</td>
<td>Automation test</td>
</tr>
<tr>
<td>selectWindow</td>
<td>null</td>
<td></td>
</tr>
<tr>
<td>storeText</td>
<td>id=subject</td>
<td>Automation Test</td>
</tr>
<tr>
<td>type</td>
<td>css=input#title.input-block-level</td>
<td>QA TEST EMAIL</td>
</tr>
<tr>
<td>type</td>
<td>id=title</td>
<td>QA TEST EMAIL</td>
</tr>
<tr>
<td>storeText</td>
<td>id=title</td>
<td>QA TEST EMAIL</td>
</tr>
<tr>
<td>type</td>
<td>name=message</td>
<td>automated test script, good job!</td>
</tr>
<tr>
<td>type</td>
<td>name=message</td>
<td>automated test script, good job!</td>
</tr>
<tr>
<td>storeText</td>
<td>name=message</td>
<td>automated test script, good job!</td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=send</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@id='email-messages']/div</td>
<td>×Successfully sent</td>
</tr>
</tbody></table>
</body>
</html>

Subject_Input Inserting as Placeholder.png

Tony Beck

unread,
Jun 3, 2014, 2:24:45 PM6/3/14
to seleniu...@googlegroups.com
I'm new here, but I am wondering have you tried targeting the input? So, rather than using

<td>type</td>
<td>id=title</td>
<td>QA TEST EMAIL</td>
<td>QA TEST EMAIL</td>
try

<td>type</td>
<td>//input[@id=‘title’]</td>
<td>QA TEST EMAIL</td>
<td>QA TEST EMAIL</td>
Reply all
Reply to author
Forward
0 new messages