htmlunit or htmlunitwithjs not working in RG

12 views
Skip to first unread message

Venish Martin

unread,
Apr 28, 2020, 7:04:42 PM4/28/20
to robotframework-devel
I'm getting below error while running RF code using HTMLUNIT. Kindly suggest what needs to be added as capability or any other way to do it.

MaxRetryError: HTTPConnectionPool(host='false', port=80): Max retries exceeded with url: /session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x02DEBF90>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed'))

My code is:

*** Settings ***
#Documentation This example demonstrates how to use current library
Library Selenium2Library
#Library XvfbRobot

*** Test Cases ***
Create Headless Browser
#Start Virtual Display 1920 1080
Open Browser https://www.google.co.in/ htmlunitwithjs desired_capabilities=setJavascriptEnabled:true
Set Window Size 1920 1080
${title}= Get Title
Should Be Equal Google ${title}
[Teardown] Close Browser
Reply all
Reply to author
Forward
0 new messages