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
1=== modified file 'src/sst/actions.py'
2--- src/sst/actions.py 2011-09-25 19:33:13 +0000
3+++ src/sst/actions.py 2011-09-26 04:37:24 +0000
4@@ -358,8 +358,8 @@
5
6
7 _textfields = (
8- 'text', 'password', 'textarea',
9- 'email', 'url', 'search', 'number')
10+ 'text', 'password', 'textarea', 'email',
11+ 'url', 'search', 'number', 'file')
12
13
14 def is_textfield(id_or_elem):
15
16=== added file 'src/sst/selftests/file_input.py'
17--- src/sst/selftests/file_input.py 1970-01-01 00:00:00 +0000
18+++ src/sst/selftests/file_input.py 2011-09-26 04:37:24 +0000
19@@ -0,0 +1,16 @@
20+import os
21+from sst.actions import *
22+
23+"""Test actions related to file input elements."""
24+
25+
26+goto('/')
27+
28+# Assert that the input file is a textfield.
29+is_textfield('file_input')
30+is_textfield(get_element(id='file_input'))
31+
32+# Enter a path to an existing file on the file input.
33+file_path = os.path.abspath(__file__)
34+textfield_write('file_input', file_path)
35+text_is('file_input', file_path)
36
37=== modified file 'src/testproject/templates/index.html'
38--- src/testproject/templates/index.html 2011-09-25 17:36:08 +0000
39+++ src/testproject/templates/index.html 2011-09-26 04:37:24 +0000
40@@ -125,6 +125,10 @@
41 <td><label for="text_2">Password: </label></td>
42 <td><input type="password" name="password1" id="pass_1" /></td>
43 </tr>
44+ <tr>
45+ <td><input type="file" name="file_input" id="file_input" /></td>
46+ <td><label for="file_input">A File Input</label></td>
47+ </tr>
48 </table>
49
50 </p>

Subscribers

People subscribed via source and target branches