Automated test with selenium webdriver

Last post 07-16-2012, 7:37 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  07-13-2012, 1:56 PM 74126

    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 !
  •  07-16-2012, 7:37 AM 74144 in reply to 74126

    Re: Automated test with selenium webdriver

    Hi cshark,
     
    For security reason, AjaxUploader does not support to set the upload file path directly. The upload file must select by the user. Sorry for your inconvenience.
     
    Regards,
     
    Ken 
View as RSS news feed in XML