Hi Bruce,
I found out that the problem was with rendering time of page.
My original code was:
selenium.open("/myapp/login.html");
selenium.type("j_username", "administrator");
selenium.type("j_password", "adm");
selenium.click("//input[@value='Log in...']");
selenium.waitForPageToLoad("30000");
verifyTrue(selenium.isTextPresent("Welcome."));
selenium.click("//a[@name='btNewCustomer']");
And when I added a Thread.sleep before click on button, it works....
selenium.open("/myapp/login.html");
selenium.type("j_username", "administrator");
selenium.type("j_password", "adm");
selenium.click("//input[@value='Log in...']");
selenium.waitForPageToLoad("30000");
verifyTrue(selenium.isTextPresent("Welcome."));
Thread.sleep(5000);
selenium.click("//a[@name='btNewCustomer']");
I thought selenium.waitForPageToLoad would do the same thing as Thread.sleep
Thank you
Marco