views:

16

answers:

0

I have successfully added the javascript library in eclipse. In my library file I have a function(TypeUserName) and want to import it in a JAVA class. What is the syntax? This is my code:

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;

public class demoProject extends SeleneseTestCase {

public void testdemoProject() throws Exception {
  selenium.open("https://www.google.com");
  selenium.waitForPageToLoad("30000");
  selenium.doTypeUserName("//input[@id='edit-name' and @name='name' and @value='']");

 }
}