Skip to content

Commit

Permalink
[java] Fixing compound class name handling
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Jun 14, 2019
1 parent 3d119e1 commit 1307d3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Resources;

import org.openqa.selenium.InvalidSelectorException;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.interactions.Interaction;
import org.openqa.selenium.interactions.KeyInput;
Expand Down Expand Up @@ -187,6 +188,9 @@ public W3CHttpCommandCodec() {

switch (using) {
case "class name":
if (value.matches(".*\\s.*")) {
throw new InvalidSelectorException("Compound class names not permitted");
}
toReturn.put("using", "css selector");
toReturn.put("value", "." + cssEscape(value));
break;
Expand Down
3 changes: 0 additions & 3 deletions java/client/test/org/openqa/selenium/ElementFindingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,6 @@ public void testFindingASingleElementByCompoundClassNameShouldThrow() {
}

@Test
@NotYetImplemented(MARIONETTE)
@NotYetImplemented(SAFARI)
@NotYetImplemented(EDGE)
public void testFindingMultipleElementsByCompoundClassNameShouldThrow() {
driver.get(pages.xhtmlTestPage);
assertThatExceptionOfType(NoSuchElementException.class)
Expand Down

0 comments on commit 1307d3a

Please sign in to comment.