Skip to content

Commit

Permalink
fixed assertion of selenium text field value
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhimin Zhan authored and Zhimin Zhan committed Jun 20, 2012
1 parent 275b06c commit 4724383
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.txt
@@ -1,3 +1,7 @@
1.4.9 (2012-06-20)
- selenium: new select syntax
- selenium: assert text field value

1.4.8 (2012-05-12)
- support watir 3

Expand Down
2 changes: 1 addition & 1 deletion build.xml
Expand Up @@ -30,7 +30,7 @@
<format property="today" pattern="yyyyMMdd"/>
</tstamp>
<!-- <buildnumber/> -->
<property name="versionNumber" value="1.4.8"/>
<property name="versionNumber" value="1.4.9"/>
<echo message="Extension version: ${versionNumber}"/>
<mkdir dir="${targetDir}"/>
<mkdir dir="${targetDir}/chrome"/>
Expand Down
9 changes: 5 additions & 4 deletions src/content/editors/selenium_webdriver_editor.js
Expand Up @@ -142,14 +142,15 @@ conversions["setCheckbox"] = function(oStep)

conversions["setSelectField"] = function(oStep)
{
return 'select_elem = browser.' + identifyInputField(oStep) + ';' +
"options = select_elem.find_elements(:tag_name, \"option\"); " +
"options.each { |opt| opt.click if opt.text == \"" + oStep.text + "\"}"
// return 'select_elem = browser.' + identifyInputField(oStep) + ';' +
// "options = select_elem.find_elements(:tag_name, \"option\"); " +
// "options.each { |opt| opt.click if opt.text == \"" + oStep.text + "\"}"
return "Selenium::WebDriver::Support::Select.new(browser." + identifyInputField(oStep) + ").select_by(:text, \"" + oStep.text + "\")"
}

conversions["verifyInputField"] = function(oStep)
{
var tagName = "browser.text_field";
var tagName = "browser.find_element";
if (oStep.tagName == "TEXTAREA") {
tagName = "browser.area";
}
Expand Down

0 comments on commit 4724383

Please sign in to comment.