Ask a Question

backslash being removed

kevin_kapell
Frequent Contributor

backslash being removed

backslashes appear to be being removed now in TestComplete 12.0.122.7, Web

 

To illustrate I have the following code.

 

var Filepath = "C:/Repository/Automation/TestFiles"
Log.Event(Filepath)
var Filepath = "C:\Repository\Automation\TestFiles"
Log.Event(Filepath)

 

This results in the first log entry being

C:/Repository/Automation/TestFiles

 

and the second log entry being

C:RepositoryAutomationTestFiles

 

I am running this on IE 11.

 

This is preventing me from uploading a file to a web page as part of my automation.

2 REPLIES 2
kevin_kapell
Frequent Contributor

Some additional information.

 

When I make the path

C:\\Repository\\Automation\\TestFiles

 

then it records it in the log as

C:\Repository\Automation\TestFiles

dnguyen
Staff

Hi Kevin,

 

Please note that when scripting there are special characters that need to be 'escaped' when used in strings.

Character sequence Description
\\ Backslash
\b Backspace
\r Carriage return
\" Double quote
\f Form feed
\n New line
\' Single quote
\t Tab

 

 

Danny Nguyen
Associate Customer Support Engineer
cancel
Showing results for 
Search instead for 
Did you mean: