Saturday, March 23, 2013

How to avoid escape sequences in SendKeys method parameter string

Instead of escape sequences use @ before the string input parameter of SendKeys method, like in the below code snippet . 


driver.FindElement(By.Id("fileupload")).SendKeys(@"C:\Users\myuser\Documents\Visual Studio 2010\Projects\TestPackages\new-package\0.0.1\new-package.zip");


1 comment:

  1. Hi CheryJose,
    Can you Please tell me How to interact with "Print Dialog" windows using Selenium WebDriver C#

    ReplyDelete