Showing posts with label selenium. Show all posts
Showing posts with label selenium. Show all posts

Oct 15, 2012

How to run Selenium in background in virtual display (Xvfb)

http://en.wikipedia.org/wiki/Xvfb

In the X Window System, Xvfb or X virtual framebuffer is an X11 server that performs all graphical operations in memory, not showing any screen output. From the point of view of the client, it acts exactly like any other server, serving requests and sending events and errors as appropriate. However, no output is shown. This virtual server does not require the computer it is running on to even have a screen or any input device. Only a network layer is necessary.

Xvfb is primarily used for testing

PyVirtualDisplay - a Python wrapper for Xvfb:
#!/usr/bin/env python

from pyvirtualdisplay import Display
from selenium import webdriver

display = Display(visible=0, size=(800, 600))
display.start()

# now Firefox will run in a virtual display. 
# you will not see the browser.
browser = webdriver.Firefox()
browser.get('http://www.google.com')
print browser.title
browser.quit()

display.stop()
http://stackoverflow.com/questions/6183276/how-do-i-run-selenium-in-xvfb

Aug 8, 2012

How to test Selenium CSS and XPath expretions in Chrome

You can simply test them in console:
// XPath syntax:
$x("EXPRESSION_HERE")
 
//CSS syntax:
$$("EXPRESSION_HERE")

Apr 16, 2012

Selenium first test

http://habrahabr.ru/post/141994/

Лучше использовать Webdriver а не Selenium RC

Feb 14, 2012

Selenium + python + jenkins

http://blog.shiningpanda.com/2012/02/selenium-python-and-jenkins-on-debian_14.html

BDD (Lattuce и Splinter)

BDD (Behaviour Driven Development) - тесты пишутся на native english т.е. в итоге их смогут писать не программисты (тестировщики, кодеры или менеджеры)

Видео: http://python.mirocommunity.org/video/5169/djangocon-2011-testing-with-le
Используется Lattuce и надстройка над Selenium - Splinter


Видео: http://www.youtube.com/watch?v=OMLDHNaUMB8
Freshen + Behave