Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebElement.getText() function and utf8

May i assume that for every web page the WebElement.getText() function does return utf8 Strings, or can it have other encodings?

If there could be other encodings, how can i identify it and convert it to utf8?

like image 743
David Michael Gang Avatar asked May 15 '26 01:05

David Michael Gang


1 Answers

I don't know no one good way(maybe if you like reflection, you can hack and rewrite) to do getText() return needed encoding. But in this Selenium web driver and multillanguage I wrote some way to encode String.

like image 195
Renat Avatar answered May 16 '26 13:05

Renat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!