Webdriver with Python

Posted by vishal kharge on Stack Overflow See other posts from Stack Overflow or by vishal kharge
Published on 2010-05-04T07:43:23Z Indexed on 2010/05/04 7:48 UTC
Read the original article Hit count: 525

Filed under:
|
|

I had written a scipt in Java with Webdriver and it worked fine and below is the code for the sample

import org.junit.After;

import org.junit.AfterClass;

import org.junit.Before;

import org.junit.BeforeClass;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebDriverBackedSelenium;

import org.openqa.selenium.firefox.FirefoxDriver;

import com.thoughtworks.selenium.Selenium;

import java.util.*;

import java.lang.Thread.*;

public class Login {

@BeforeClass public static void setUpBeforeClass() throws Exception { }

@AfterClass public static void tearDownAfterClass() throws Exception { }

@Before public void setUp() throws Exception { }

@After public void tearDown() throws Exception { }

public static void main(String[] args) {
     WebDriver driver = new FirefoxDriver();
     Selenium selenium = new WebDriverBackedSelenium(driver, "http://192.168.10.10:8080/");
     selenium.open("/");

selenium.keyPress("name=user_id", "admin"); } }

}

But my requirement is to implement the same in python with webdriver, can you please let me know how this can be done with the above example and webdriver binaries and how to do setup for the same

© Stack Overflow or respective owner

Related posts about python

Related posts about selenium