*** Settings ***
Library Selenium2Library 3 3 Log Source
*** Variables ***
${BROWSER} HTMLUnit
*** Test Cases ***
Test example
Open Browser http://localhost:8080/ ${BROWSER}
Page Should Contain Greetings!
[Teardown] Close Browser
You'll get this if content type is text/plain instead of text/html:
Test example | FAIL |
Page should have contained text 'Greetings!' but did not.
However source logs will tell that text "Greetings!" was found, causing lot of headaches when debugging. No log option seems to indicate any problem with content type.
Test immediately starts to work if content type is set to text/html.
Also note that accept header that is sent is "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", indicating that text/plain might be supported, when apparently only text/html is supported (?)
With a simple test:
You'll get this if content type is
text/plain
instead oftext/html
:However source logs will tell that text "Greetings!" was found, causing lot of headaches when debugging. No log option seems to indicate any problem with content type.
Test immediately starts to work if content type is set to
text/html
.Also note that accept header that is sent is
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
, indicating thattext/plain
might be supported, when apparently onlytext/html
is supported (?)