문제

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.

도움이 되었습니까?

해결책

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}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top