Revision: 932 http://jwebunit.svn.sourceforge.net/jwebunit/?rev=932&view=rev Author: henryju Date: 2011-10-10 15:53:54 +0000 (Mon, 10 Oct 2011) Log Message: ----------- Update to Selenium 2.8.0. No need to override HtmlUnitWebElement anymore.
Modified Paths: -------------- trunk/jwebunit-webdriver-plugin/pom.xml trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java Removed Paths: ------------- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitWebElement.java Modified: trunk/jwebunit-webdriver-plugin/pom.xml =================================================================== --- trunk/jwebunit-webdriver-plugin/pom.xml 2011-10-10 14:51:03 UTC (rev 931) +++ trunk/jwebunit-webdriver-plugin/pom.xml 2011-10-10 15:53:54 UTC (rev 932) @@ -30,7 +30,7 @@ <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-htmlunit-driver</artifactId> - <version>2.7.0</version> + <version>2.8.0</version> <exclusions> <exclusion> <artifactId>commons-logging</artifactId> @@ -41,7 +41,7 @@ <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-support</artifactId> - <version>2.7.0</version> + <version>2.8.0</version> </dependency> <dependency> <groupId>net.sourceforge.jwebunit</groupId> Deleted: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java =================================================================== --- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java 2011-10-10 14:51:03 UTC (rev 931) +++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java 2011-10-10 15:53:54 UTC (rev 932) @@ -1,38 +0,0 @@ -/** - * Copyright (c) 2011, JWebUnit team. - * - * This file is part of JWebUnit. - * - * JWebUnit is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * JWebUnit is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with JWebUnit. If not, see <http://www.gnu.org/licenses/>. - */ -package net.sourceforge.jwebunit.webdriver; - -import org.openqa.selenium.Capabilities; - -import com.gargoylesoftware.htmlunit.html.HtmlElement; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.htmlunit.HtmlUnitDriver; - - -public class FixedHtmlUnitDriver extends HtmlUnitDriver { - - public FixedHtmlUnitDriver(Capabilities capabilities) { - super(capabilities); - } - - protected WebElement newHtmlUnitWebElement(HtmlElement element) { - return new FixedHtmlUnitWebElement(this, element); - } - -} Deleted: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitWebElement.java =================================================================== --- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitWebElement.java 2011-10-10 14:51:03 UTC (rev 931) +++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitWebElement.java 2011-10-10 15:53:54 UTC (rev 932) @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2011, JWebUnit team. - * - * This file is part of JWebUnit. - * - * JWebUnit is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * JWebUnit is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with JWebUnit. If not, see <http://www.gnu.org/licenses/>. - */ -package net.sourceforge.jwebunit.webdriver; - -import com.gargoylesoftware.htmlunit.html.DomElement; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlSelect; -import com.gargoylesoftware.htmlunit.html.HtmlTextArea; -import java.net.MalformedURLException; -import java.util.List; - -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlOption; - -import com.gargoylesoftware.htmlunit.html.HtmlElement; -import org.openqa.selenium.htmlunit.HtmlUnitDriver; - -import org.openqa.selenium.htmlunit.HtmlUnitWebElement; - -/** - * Fix for issue http://code.google.com/p/selenium/issues/detail?id=2295 - * - * @author julien, 23 sept. 2011 - */ -public class FixedHtmlUnitWebElement extends HtmlUnitWebElement { - - public FixedHtmlUnitWebElement(HtmlUnitDriver parent, HtmlElement element) { - super(parent, element); - } - - @Override - public boolean isSelected() { - assertElementNotStale(); - - if (element instanceof HtmlInput) { - return ((HtmlInput) element).isChecked(); - } - else if (element instanceof HtmlOption) { - return ((HtmlOption) element).isSelected(); - } - - throw new UnsupportedOperationException("Unable to determine if element is selected. Tag name is: " + element.getTagName()); - } - - @Override - public String getAttribute(String name) { - assertElementNotStale(); - - final String lowerName = name.toLowerCase(); - - if (element instanceof HtmlOption && "selected".equals(lowerName)) { - return ((HtmlOption) element).isSelected() ? "true" : null; - } - - if ("value".equals(lowerName)) { - if (element instanceof HtmlTextArea) { - return ((HtmlTextArea) element).getText(); - } - - if (element instanceof HtmlOption) { - return ((HtmlOption) element).getValueAttribute(); - } - } - - return super.getAttribute(name); - } -} Modified: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java =================================================================== --- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2011-10-10 14:51:03 UTC (rev 931) +++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2011-10-10 15:53:54 UTC (rev 932) @@ -117,7 +117,7 @@ capabilities.setBrowserName("htmlunit"); capabilities.setVersion("firefox"); - driver = new FixedHtmlUnitDriver(capabilities); + driver = new HtmlUnitDriver(capabilities); //Reset form formIdent = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ JWebUnit-development mailing list JWebUnit-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jwebunit-development