Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed assertion of select value

  • Loading branch information...
commit 6bed81f87cb9896baac072e938ade5b532c3afab 1 parent e0872d6
Zhimin Zhan authored
5 ChangeLog.txt
View
@@ -1,3 +1,8 @@
+1.5 (2012-09-15)
+ - {selenium} fixed clear checkbox for
+ - fixed checkpoint for select/dropdown value
+ - {selenium} fixed checkpoint for input value
+
1.4.9 (2012-06-20)
- selenium: new select syntax
- selenium: assert text field value
2  build.xml
View
@@ -30,7 +30,7 @@
<format property="today" pattern="yyyyMMdd"/>
</tstamp>
<!-- <buildnumber/> -->
- <property name="versionNumber" value="1.4.9"/>
+ <property name="versionNumber" value="1.5.0"/>
<echo message="Extension version: ${versionNumber}"/>
<mkdir dir="${targetDir}"/>
<mkdir dir="${targetDir}/chrome"/>
20 src/content/editors/selenium_webdriver_editor.js
View
@@ -100,11 +100,6 @@ function identifyInputField(oStep)
conversions["setInputField"] = function(oStep)
{
- var tagName = "text_field";
- if (oStep.tagName == "TEXTAREA") {
- tagName = "area";
- }
-
return 'browser.' + identifyInputField(oStep) + '.send_keys("' + oStep.value + '")'
}
@@ -136,7 +131,7 @@ conversions["setCheckbox"] = function(oStep)
if (oStep.checked == "true") {
return 'browser.' + identifyInputField(oStep) + '.click'
} else {
- return 'browser.' + identifyInputField(oStep) + '.clear'
+ return 'browser.' + identifyInputField(oStep) + '.click if browser.' + identifyInputField(oStep) + ".selected?"
}
}
@@ -151,21 +146,16 @@ conversions["setSelectField"] = function(oStep)
conversions["verifyInputField"] = function(oStep)
{
var tagName = "browser.find_element";
- if (oStep.tagName == "TEXTAREA") {
- tagName = "browser.area";
- }
-
if (oStep.htmlId) {
- return tagName + '(:id, "' + oStep.htmlId + '").value.should == "' + oStep.value + '"'
+ return tagName + '(:id, "' + oStep.htmlId + '").attribute("value").should == "' + oStep.value + '"'
} else if (oStep.name) {
- return tagName + '(:name, "' + oStep.name + '").value.should == "' + oStep.value + '"'
+ return tagName + '(:name, "' + oStep.name + '").attribute("value").should == "' + oStep.value + '"'
} else {
- return tagName + '(:id, "specify_id_here").value.should == "' + oStep.value + '"'
+ return tagName + '(:id, "specify_id_here").attribute("value").should == "' + oStep.value + '"'
}
}
conversions["verifySelectField"] = function(oStep)
{
- var tagName = "select_list";
- return tagName + '(:id, "' + oStep.htmlId + '").value.should == "' + oStep.value + '"';
+ return 'Selenium::WebDriver::Support::Select.new(browser.find_element(:id, "' + oStep.htmlId + '")).first_selected_option.text.should == "' + oStep.value + '"';
}
2  src/content/overlay.js
View
@@ -214,7 +214,7 @@ WTR_Overlay.addVerifySelectField = function(_oEvent)
try
{
var focusedElement = document.popupNode;
- var childSelectElement = focusedElement.childNodes[1];
+ var childSelectElement = focusedElement;
var oStep = new WTRStep("verifySelectField", {
name: childSelectElement.name,
value: childSelectElement.value,
2  src/install.rdf
View
@@ -7,7 +7,7 @@
<em:name>TestWise Recorder</em:name>
<em:id>@extension.id@</em:id>
- <em:version>1.4.9</em:version>
+ <em:version>1.5.0</em:version>
<em:type>2</em:type>
<em:description>Recording tool to help creating automated test scripts (RWebSpec and Watir) for web applications
</em:description>
Please sign in to comment.
Something went wrong with that request. Please try again.