Need Info - ways to debug in phantomjs browser

已查看 91 次
跳至第一个未读帖子

Vikram

未读,
2015年9月4日 10:46:262015/9/4
收件人 Selenium Users
Hi All,

I've started using phantomjs and basic scripts like log-in are failing in it. ( which works fine in other visual browsers )

I'm not sure how to debug these kind of issues without any visual clues.

Please let me know any tips to debug failures in headless browser

Thanks in advance.

Regards,
Vikram

Mark Collin

未读,
2015年9月4日 10:59:112015/9/4
收件人 Selenium Users

Vikram

未读,
2015年9月7日 12:43:412015/9/7
收件人 Selenium Users
Hi Mark,

Thanks for code sample , I will try this out and update on this thread.

Regards,
Vikram

Vikram

未读,
2015年9月8日 09:02:162015/9/8
收件人 Selenium Users
Hi Mark,

I tried this code but it captures blank screenshot for "phantomjs" browser.

This code does work for visual browsers like Chrome / FF though.

Not sure why is it only failing for phantomjs 

Thanks,
Vikram

Mark Collin

未读,
2015年9月16日 15:32:152015/9/16
收件人 seleniu...@googlegroups.com
Can you supply your code so we can have a look.

Works on my machine ;)

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e94ae9b9-4011-4c61-aed0-e7a435d80cb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Doug Dragon

未读,
2015年9月17日 13:41:222015/9/17
收件人 Selenium Users
If it's capturing a blank screenshot you'll want to check the response you're getting from the page. You can try getting the current url [a] our print out the page source [b] to see what might be coming back.


a (python):
self.driver.current_url

a (python):
print(self.driver.page_source)


Hope this helps,

-Doug

Vikram

未读,
2015年10月2日 04:55:172015/10/2
收件人 Selenium Users
Sorry I forgot to update on this thread earlier , there is bug with Phantomjs which results in "click" method not working at all.

I have stopped working on Phantomjs as click failure means I can't log-in to my app at all from log-in screen.

Regards,
Vikram

Doug Dragon

未读,
2015年10月2日 11:21:322015/10/2
收件人 Selenium Users
Interesting. I wonder what the bug is. I currently use Selenium's phantomjs in my testing.

Vikram

未读,
2015年10月13日 06:32:162015/10/13
收件人 Selenium Users
Hi Doug,

sorry for delayed update , my intention of trying out "phantomjs" was to speed up automation execution.

But as this is not a real browser which customer users.

After spending days on phantomjs -> parallel execution , I have decided to go ahead with Grid setup using Docker.

As of now this is the best approach , I could find to speed up automation.

Please suggest if you have any other means.

thanks & regards,
Vikram

Doug Dragon

未读,
2015年10月13日 09:59:292015/10/13
收件人 Selenium Users
Hi Vikram,
No problem, everybody's busy.

I'm not so sure phantomjs would necessarily speed up execution, but it works for what I used it for on my team. We're using phantomjs version 1.9.8 / Selenium 2.42.1 on an Ubuntu 12.04.4 LTS server. I have noticed some gotchas as far as how phantomjs handles the javascript we use (angular) but for the most part, it works ok. Sounds like you've have better luck using another webdriver binding.

Good luck!

-Doug
回复全部
回复作者
转发
0 个新帖子