
| Key: |
SRC-484
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Vince Spicer
|
| Votes: |
0
|
| Watchers: |
1
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Original Estimate:
|
0.17h
|
Remaining Estimate:
|
0.17h
|
Time Spent:
|
Unknown
|
|
File Attachments:
|
1.
selenium.diff (1 kb)
|
|
|
in the Selenium Driver the get_number function returns a string instead of an integer.
Also the selenium.get_selected_index(select) returned a string aswell.
This was complicating things when trying to select the next value in a select box.
Simple patch below
Index: /selenium.py
===================================================================
--- /selenium.py (revision XXXX)
+++ /selenium.py (working copy)
@@ -228,8 +228,10 @@
return tokens
def get_number(self, verb, args):
- # Is there something I need to do here?
- return self.get_string(verb, args)
+ try:
+ return int(self.get_string(verb, args))
+ except TypeError:
+ return None
def get_number_array(self, verb, args):
# Is there something I need to do here?
@@ -1175,7 +1177,7 @@
'selectLocator' is an element locator identifying a drop-down menu
"""
- return self.get_string("getSelectedIndex", [selectLocator,])
+ return self.get_number("getSelectedIndex", [selectLocator,])
def get_selected_ids(self,selectLocator):
|
|
Description
|
in the Selenium Driver the get_number function returns a string instead of an integer.
Also the selenium.get_selected_index(select) returned a string aswell.
This was complicating things when trying to select the next value in a select box.
Simple patch below
Index: /selenium.py
===================================================================
--- /selenium.py (revision XXXX)
+++ /selenium.py (working copy)
@@ -228,8 +228,10 @@
return tokens
def get_number(self, verb, args):
- # Is there something I need to do here?
- return self.get_string(verb, args)
+ try:
+ return int(self.get_string(verb, args))
+ except TypeError:
+ return None
def get_number_array(self, verb, args):
# Is there something I need to do here?
@@ -1175,7 +1177,7 @@
'selectLocator' is an element locator identifying a drop-down menu
"""
- return self.get_string("getSelectedIndex", [selectLocator,])
+ return self.get_number("getSelectedIndex", [selectLocator,])
def get_selected_ids(self,selectLocator):
|
Show » |
|