Closed
Description
Preface
This is a bit of a long convoluted chain (So apologies in advance). I'm not even sure if this is 100% fixable. But I'll post it here and try include as much info.
When using Selenium::Webdriver.logger
in standard selenium practice, you can pipe debug messages. The following issue occurs (Page under test is: https://www.citizensadvice.org.uk/immigration/ - A national charity website).
Simple reproduction case
- Grab text of footer using selenium. With the footer on this website, we have a
©
character. - If selenium logging is set, pipe some debug info to the selenium logger (This is a standard ruby logger)
- Whilst debugging the info here. We get a Ruby Logger
Kernel.warn
message
log writing failed. "\xC2" from ASCII-8BIT to UTF-8
Root cause
The root cause issue (I believe), is with this process flow. The capitalised letters refer to which library is doing the code processing at that time.
- SELENIUM - A request payload is built up using a standard API Payload structure
- NET::HTTP - The request is sent using the Selenium HTTP adapter (Which is just an instance of the net http one).
- NET::HTTP - The request object is returned with all the standard properties - This is where the non-conformancy is generated.
- SELENIUM - Selenium then processes this through a series of check to ensure safety
- LOGGER - If configured it will do a debug-trace log (We have this set to on) - This is where the error is bubbled up.
Next steps?
I am not 100% sure. I think it would be nice to know why this encoding conversion is happening. I can patch it fine my end. But it has been mentioned to try trace exactly where / why it's occurring.
Metadata
Metadata
Assignees
Labels
No labels