driver.findElement(By.xpath(xPath)).getText()
which returns legible text if driver is FirefoxDriver but just
'?????????' if driver is WebRemoteDriver.
I found this while debugging:
// Force encoding as UTF-8.
byte[] bytes = json.toString().getBytes("UTF-8");
return new String(bytes, "UTF-8");
in AbstractExtensionConnection class for FirefoxDriver. And this
if (httpMethod instanceof PostMethod) {
((PostMethod) httpMethod)
.setRequestEntity(new StringRequestEntity(payload,
"application/json", "UTF-8"));
}
in HttpCommandExecutor class for WebRemoteDriver, but getText() uses
Get http method thus charset is not set in UTF8.
Isn't it customizing?
Regards,
Simon
> --
>
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
>
>
>
Star the issue to be notified of progress