Skip to content

Commit e4f26e8

Browse files
committed
WDBC: restoring backward compatibility after changes in getCurrentUrl semantics
1 parent 9d132ee commit e4f26e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/client/src/com/thoughtworks/selenium/webdriven/commands/GetLocation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919

2020
import com.thoughtworks.selenium.webdriven.SeleneseCommand;
2121

22+
import org.openqa.selenium.JavascriptExecutor;
2223
import org.openqa.selenium.WebDriver;
2324

2425
public class GetLocation extends SeleneseCommand<String> {
2526
@Override
2627
protected String handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) {
27-
return driver.getCurrentUrl();
28+
return ((JavascriptExecutor) driver).executeScript("return window.location.href").toString();
2829
}
2930
}

0 commit comments

Comments
 (0)