Merge lp:~elopio/selenium-simple-test/file-input into lp:selenium-simple-test

Proposed by Leo Arias
Status: Merged
Approved by: Corey Goldberg
Approved revision: 196
Merge reported by: Corey Goldberg
Merged at revision: not available
Proposed branch: lp:~elopio/selenium-simple-test/file-input
Merge into: lp:selenium-simple-test
Diff against target: 50 lines (+22/-2)
3 files modified
src/sst/actions.py (+2/-2)
src/sst/selftests/file_input.py (+16/-0)
src/testproject/templates/index.html (+4/-0)
To merge this branch: bzr merge lp:~elopio/selenium-simple-test/file-input
Reviewer Review Type Date Requested Status
Corey Goldberg (community) Approve
Review via email: mp+76933@code.launchpad.net

Commit message

Fixes LP: #859342: support for writing into file inputs.

Description of the change

Added support for writing into file inputs. (LP: #859342)

To post a comment you must log in.
Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

nice work. thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/sst/actions.py'
--- src/sst/actions.py 2011-09-25 19:33:13 +0000
+++ src/sst/actions.py 2011-09-26 04:37:24 +0000
@@ -358,8 +358,8 @@
358358
359359
360_textfields = (360_textfields = (
361 'text', 'password', 'textarea',361 'text', 'password', 'textarea', 'email',
362 'email', 'url', 'search', 'number')362 'url', 'search', 'number', 'file')
363363
364364
365def is_textfield(id_or_elem):365def is_textfield(id_or_elem):
366366
=== added file 'src/sst/selftests/file_input.py'
--- src/sst/selftests/file_input.py 1970-01-01 00:00:00 +0000
+++ src/sst/selftests/file_input.py 2011-09-26 04:37:24 +0000
@@ -0,0 +1,16 @@
1import os
2from sst.actions import *
3
4"""Test actions related to file input elements."""
5
6
7goto('/')
8
9# Assert that the input file is a textfield.
10is_textfield('file_input')
11is_textfield(get_element(id='file_input'))
12
13# Enter a path to an existing file on the file input.
14file_path = os.path.abspath(__file__)
15textfield_write('file_input', file_path)
16text_is('file_input', file_path)
017
=== modified file 'src/testproject/templates/index.html'
--- src/testproject/templates/index.html 2011-09-25 17:36:08 +0000
+++ src/testproject/templates/index.html 2011-09-26 04:37:24 +0000
@@ -125,6 +125,10 @@
125 <td><label for="text_2">Password: </label></td>125 <td><label for="text_2">Password: </label></td>
126 <td><input type="password" name="password1" id="pass_1" /></td>126 <td><input type="password" name="password1" id="pass_1" /></td>
127 </tr>127 </tr>
128 <tr>
129 <td><input type="file" name="file_input" id="file_input" /></td>
130 <td><label for="file_input">A File Input</label></td>
131 </tr>
128 </table>132 </table>
129133
130 </p>134 </p>

Subscribers

People subscribed via source and target branches