Automated test with selenium webdriver

  •  07-13-2012, 1:56 PM

    Automated test with selenium webdriver

    Hi,

    I'm doing automated testing for my web system using selenium webdriver, the problem is that I can’t interact with ajaxuploader component, I need to upload the document so the test can be successful, I tried different options but can't find how to pass the file path (user machine) directly to the control, for example: this is the selenium's code used for a common fileupload control:

    1. driver.FindElement(By.Id("__tab_ctl00_IssueTabs_ctlBugTabs_Tabs_Attachments")).Click();  
    2. driver.FindElement(By.Id("ctl00_IssueTabs_ctlBugTabs_Tabs_Attachments_FileUpload")).SendKeys("C:\\Users\\omar\\Pictures\\AccessTable.JPG");  
     how can I pass the file path directly to the control?, thanks in advance !
View Complete Thread