Is there any inbuilt browser for web automation using python? - python

I have tried splinter for browser automation. Used firefox webdriver in splinter. But the problem is high CPU usage when the firefox loads and sometimes its hangs the gui. Please suggest me an option. I'm in a Linux box(Ubuntu) and building an app using pygtk.

Selinum with phantomjs should be a good replacement of splinter.

Related

Can a backend web service use selenium with a headless Chromium?

I'm developing a chatbot for a school project, which will utilise a web service in the backend, intending to deploy it onto a third party cloud server host such as Heroku.
The web service will be doing periodic web scraping in realtime. I was developing with BeautifulSoup until I discover dynamically loaded content in the pages I need to scrape, so I've to switch to Selenium.
The problem is that Selenium requires a browser, but the cloud server doesn't have a GUI and probably doesn't allow installation of applications too.
So one solution I thought of is to use Chromium, a portable version of Chrome which doesn't need installation, in headless mode, which doesn't need a GUI.
How to connect to Chromium Headless using Selenium
Can Selenium Webdriver open browser windows silently in background?
I'm still a long way from figuring out how to deploy onto a cloud hosting server, let alone test my idea, so I thought to just seek professional input in advance. Will my web service be permitted by host servers to run in this manner?

How do I access Chromium extension API from Selenium Webdriver?

Is it possible to make a chromium extension that would expose an API to python selenium webdriver code? For example, I can make an extension with a background script, that would count the tabs with chrome.tabs.query, now I'd like to access that information from my python code using selenium webdriver.
I've been able to do this by querying background script from content script using chrome.extension.sendMessage, saving the data to window.localStorage, and fetching it to python with Command.GET_LOCAL_STORAGE_ITEM (or execute_script, doesn't matter), but is there a simpler way?

phantomjs doesn't support flash player in windows machine

I am developing a python script to take screenshots from many websites. for this I am using below tools,
phantomjs with selenium
python
windows PC
I have used pyside(instead of phantomjs) for that job but I faced many issues on pyside..
now I have found phantomjs tool from Google.com, I have used phantomjs with selenium for python in windows machine it is working flawless. but it has only one issue phantomjs doesn't support flash player, so am not able to process youtube and some flash websites.. please give me the some quick fix for this
PhantomJS does not and probably will not support Flash and other plugins (see here).
But you can use SlimerJS in your Selenium tests, which is a headless browser based on the Gecko engine. It does support the WebDriver protocol, so use it.
There is also a fork of PhantomJS with Flash support, but it didn't merge changes in PhantomJS back into it, so it is standing still at version 1.9.0.
Phantomjs now don't rely on xwindow enviroment since 1.5, also it has remove plugin support at that time. So there is no officially support for running flash player in current phantomjs version.
Howerver, there are so many project fork from the old phantomjs that has flash player enabled and keep update. You can try r3b phantomjs. Recently I had build a perfect service upon this project under ubuntu os.

How to perform flash object testing in selenium webdriver with python?

After trying to find some help on the internet related to flash testing through selenium, all I find is FlexUISelenium package available for Selenium RC. I DO NOT find any such package available for Selenium Webdriver.
I am working with python and selenium webdriver and I do not see any packages available to automate flash applications. Is there any such package available at all for webdriver? If not, how do I start automating a flash application in webdriver?
Use flashselenium or sikuli for flash object testing.

Twill alternative for integration testing

I am using to twill to do integration testing for an AppEngine (using tipfy micro framework) application but unfortunately twill is not maintained and I cannot test PUT and DELETE requests.
Is there any similar solution?
I am thinking of using PhantomJS, there are some python bindings and it can execute JS (as it is a headless webkit but I have not found much).
There are not many alternatives for headless JS testing, you could try selenium 2 web driver. Good luck :)

Categories

Resources