java - Selenium Webdriver for gwt multi upload component -


case 1: trying automate multiple file upload functionality. whatever xpath giving finding element properly, when executing program (using webdriverwait class) failing, giving following error

exception in thread "main" org.openqa.selenium.timeoutexception: timed out after 5 seconds waiting visibility of element located by.classname: gwt-fileupload build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'

case 2: trying automate upload files local server. whatever xpath giving finding element properly, when executing program (without using webdriverwait class) failing, giving following error:

exception in thread "main" org.openqa.selenium.invalidselectorexception: given selector //input[@class='gwt-fileupload either invalid or not result in webelement. following error occurred: invalidselectorerror: unable locate element xpath expression //input[@class='gwt-fileupload

code follows:

webdriver driver=new firefoxdriver(); driver.get("http://localhost:8080/application/"); driver.findelement(by.xpath("//input[@ type='text']" )).sendkeys("test");//user name driver.findelement(by.xpath("//input[@ type='password']")).sendkeys("test");//pwd driver.findelement(by.xpath("//button[@class='button']")).click();//webdriverwait wait = new webdriverwait(driver,5); wait.until(expectedconditions.visibilityofelementlocated(by.xpath("//td[@id='gwt-uid-8']")));  driver.findelement(by.xpath("//td[@id='gwt-uid-8']")).click();//dropdown selection driver.findelement(by.xpath("//td[@id='gwt-uid-3']")).click();//dropdown selection  /*wait = new webdriverwait(driver,5);                wait.until(expectedconditions.visibilityofelementlocated(byclassname.classname("gwt-fileupload")));*/  driver.findelement(by.xpath("//button[@class='button decoratedfileupload-button']")).click();//button driver.findelement(by.xpath("//input[@class='gwt-fileupload")).sendkeys("d:/xyz.doc"); 

please can me?

thanks in advance

edit:

i not able upload file using gwt-upload @ this link.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -