Robot framework with PhantomJS gateway timed out error

278 views
Skip to first unread message

Prathima Royal

unread,
Jun 13, 2017, 6:23:34 PM6/13/17
to robotframework-users
Hi,

I am trying to run my robot tests using headless browser for that I choose PhantomJS. My company has lots of firewalls and certificates to access portal. I tried to set up below code:


   File Should Exist   ${CTU_CERT_PATH}
File Should Exist ${MY_CTUDEV_CERT_FILE}
File Should Exist ${MY_CTUDEV_KEY_FILE}
${service args}= Create List --proxy=${PROXY_HOST}:${PROXY_PORT}
... --proxy-auth=pmadasu@HelloDell@2204
... --ssl-certificates-path=${CTU_CERT_PATH}
... --ssl-client-certificate-file=${MY_CTUDEV_CERT_FILE}
... --ssl-client-key-file=${MY_CTUDEV_KEY_FILE}
... --ignore-ssl-errors=yes
LOG ${service args}

File Should Exist ${PHANTOMJS_BINARY}
Create Webdriver PhantomJS
# ... executable_path=${PHANTOMJS_BINARY}
... service_args=${service args}
Go To ${BASE_URL}
capture page screenshot
page should contain Domain Access


and when I try to execute I am getting error as below:


==============================================================================
Test :: Revisions - Author: xyzTeam
==============================================================================
[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
RC-PL-TOOLS-PL:1.7                                                    | FAIL |
WebDriverException: Message: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Notification: Gateway Timeout</title>

<style type="text/css">
body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color:#333333;
  background-color: #ffffff;
}
h1 {
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  padding-top: 0px;
    [ Message content over the limit has been removed. ]
<p>
If you have questions, please contact
Canon xyz Team (&nbsp;<a href="mailto:web-exc...@xyz.com">web-exc...@xyz.com</a>&nbsp;)
and provide the codes shown below.
</p>

</div>

<div class="details"><p>
Date: Tue, 13 Jun 2017 10:10:08 GMT<br />
Username: xxx@AD<br />
Source IP: 10.21.9.83<br />
Category: Uncategorized URLs<br />
Reason: UNKNOWN<br />
Notification: GATEWAY_TIMEOUT
</p></div>
</body>
</html>

if anyone from this group know Robot Framework with PhantomJS please help me in resolving this issue.


Thanks
Prathima









Hélio Guilherme

unread,
Jun 13, 2017, 8:20:07 PM6/13/17
to robotframework-users
Hi,

It may not be PhantomJS specific problem. It could be your corporate Proxy reporting that.
Try to add the proxy settings in the test file (and not from environment variables). This is what I do for Internet Explorer.

My Favorite Open Source Projects
awsome-lists gretl robotframework
(sponsored/patrocinado) Recomendo servidores e alojamento Web em:
http://www.proalojamento.pt/

Canon xyz Team (&nbsp;<a href="mailto:web-exceptions@xyz.com">web-exceptions@xyz.com</a>&nbsp;)
and provide the codes shown below.
</p>

</div>

<div class="details"><p>
Date: Tue, 13 Jun 2017 10:10:08 GMT<br />
Username: xxx@AD<br />
Source IP: 10.21.9.83<br />
Category: Uncategorized URLs<br />
Reason: UNKNOWN<br />
Notification: GATEWAY_TIMEOUT
</p></div>
</body>
</html>

if anyone from this group know Robot Framework with PhantomJS please help me in resolving this issue.


Thanks
Prathima









--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

sandeep s

unread,
Jun 14, 2017, 12:54:18 AM6/14/17
to heliox...@gmail.com, robotframework-users
Can you take off the capture screenshot and run , 
Phantomjs is browserless/headerless , so apparently there is no UI which gets loaded ... So that keyword might fail for no reason...

[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
RC-PL-TOOLS-PL:1.7 

Secondly , try to write a mini script using python and see it woks then use the RF part...


_Sandeep


On Wed, Jun 14, 2017 at 5:50 AM, Hélio Guilherme <heliox...@gmail.com> wrote:
Boxbe This message is eligible for Automatic Cleanup! (heliox...@gmail.com) Add cleanup rule | More info

Hi,

It may not be PhantomJS specific problem. It could be your corporate Proxy reporting that.
Try to add the proxy settings in the test file (and not from environment variables). This is what I do for Internet Explorer.

My Favorite Open Source Projects
awsome-lists gretl robotframework
(sponsored/patrocinado) Recomendo servidores e alojamento Web em:
http://www.proalojamento.pt/

On Tue, Jun 13, 2017 at 11:13 AM, Prathima Royal <prathim...@gmail.com> wrote:
Canon xyz Team (&nbsp;<a href="mailto:web-exceptions@xyz.com">web-exc...@xyz.com</a>&nbsp;)
and provide the codes shown below.
</p>

</div>

<div class="details"><p>
Date: Tue, 13 Jun 2017 10:10:08 GMT<br />
Username: xxx@AD<br />
Source IP: 10.21.9.83<br />
Category: Uncategorized URLs<br />
Reason: UNKNOWN<br />
Notification: GATEWAY_TIMEOUT
</p></div>
</body>
</html>

if anyone from this group know Robot Framework with PhantomJS please help me in resolving this issue.


Thanks
Prathima









--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.

To post to this group, send email to robotframework-users@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Kevin O.

unread,
Jun 22, 2017, 2:47:54 AM6/22/17
to robotframework-users
Hey Prathima,
Wow, I had to dig deep to find my post regarding this issue.
If you look at the page, you can see the problem is that requests for localhost are getting sent to the proxy server.

Please see this post:

Also I hope you noticed that PhantomJS is pretty much dead - see https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE

I use Selenium's Docker images, which run headlessly.

Prathima Royal

unread,
Jul 5, 2017, 10:15:03 AM7/5/17
to robotframework-users
Hi Kevin,

Thank you for your reply. That's correct I have to set no proxy and 127.0.0.1 to my environment variables and then it worked with flying colours.

Best Regards
Prathima
Reply all
Reply to author
Forward
0 new messages