Control links2 by python

Is there any way to control links browser from python? I need to make some bot, twill don't work on my page, Selenium need's X server. Maybe other way to do it?

Answers


Using X virtual framebuffer Xvfb you can run selenium/web browser without X:

Xvfb :1 -screen 0 1152x864x16
DISPLAY=1 ./firefox

and run the selenium tests from command line.


I would try to use pexpect (on Unix-like systems; wexpect on Windows), just as I would for the purpose of controlling other text-based, interactive applications that don't offer an explicit API of their own.


Need Your Help

Immediate functions JavaScript

javascript function iife

Stoyan Stefanov says in JavasScript Patterns that: "you need an immediated function to wrap all your code in its local scope and not to leak any variables to the global scope" page 70.

How to execute a jar executable file and receive the return value

java process jar

Assume that I have a java program A. The Java program A needs to call another java program B(jar), passes arguments to it and receives the return value from B. How can I achieve this?