Created
September 6, 2011 16:53
-
-
Save ajayk/1198157 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: RemoteWebElement.java | |
=================================================================== | |
--- RemoteWebElement.java (revision 13749) | |
+++ RemoteWebElement.java (working copy) | |
@@ -38,7 +38,6 @@ | |
import java.util.List; | |
import java.util.Map; | |
- | |
public class RemoteWebElement implements WebElement, FindsByLinkText, FindsById, FindsByName, | |
FindsByTagName, FindsByClassName, FindsByCssSelector, FindsByXPath, WrapsDriver, Locatable { | |
@@ -72,7 +71,13 @@ | |
} | |
public void clear() { | |
- execute(DriverCommand.CLEAR_ELEMENT, ImmutableMap.of("id", id)); | |
+ if (isEnabled()) { | |
+ if (!(Boolean.valueOf(getAttribute("readonly")))) { | |
+ execute(DriverCommand.CLEAR_ELEMENT, ImmutableMap.of("id", id)); | |
+ } | |
+ }else { | |
+ //Should i throw a exception | |
+ } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment