Pergunta

I try to get html source of the web-page using Robot Framework. But I don't want to use Selenium2Library because it starts a web-browser and takes a lot of time.

Can you recommend me any Robot Framework libraries? I can write my own Library on Python using urllib2 etc. but I think there is more appropriate solution.

Foi útil?

Solução

You can use the requests library, which uses the requests python library to fetch resources on the web.

*** Settings ***
| Library     | RequestsLibrary
| Suite Setup | Create Session | example | http://www.example.com

*** Test Cases ***
| Example using the requests library
| | ${response}= | Get | example | /
| | log | ${response.content}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top