0

This is my Code

 static void Main(string[] args)
        {
    string _expectedPageTitle = "Google";
                string _firefoxBinaryPath = "Path to firefox";
                FirefoxBinary _binary = new FirefoxBinary(_firefoxBinaryPath);
                FirefoxDriver _driver = new FirefoxDriver(_binary, new FirefoxProfile());
                _driver.Navigate().GoToUrl("http://www.google.com");
                string _currentPageTitle = _driver.Title;
                if (_currentPageTitle.Equals(_expectedPageTitle))
                   Console.WriteLine("Test Passed");
                   //Debug.WriteLine("Test Passed");
                   //Trace.WriteLine("Test Passed");
                else
                    Console.Write("Test Failed");

                //_driver.Close();
}

I tried to get the output in

Console.WriteLine("Test Passed");
Debug.WriteLine("Test Passed");
Trace.WriteLine("Test Passed");

I debugged my code as well, it is navigating to each line.But I can't be able to see the output in the console window.

Could anyone advise.

2

2 Answers 2

3

Console.WriteLine method writes your output to the console window opened by your application (for terminal applications and windows apps)

Debug.WriteLine writes to the debug output window. You can open the Output window (Debug => Windows => Output)

Sign up to request clarification or add additional context in comments.

Comments

1

Have you tried?

System.Diagnostics.Debug.WriteLine

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.