Skip to content

Unsupported text/plain, no obvious error message #89

Description

@eis

With a simple test:

*** 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 (?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions