I am developing a console application using C# to automate Print Job for a bulk of documents. Below I am mentioning my plan for developing and my approach.
1)Fetch list of documents.
2)Process the document list one by one.
a)Launch the Application.
b)Wait till the application launched perfectly.
c)Fire the Print Job.
d)Wait for Print dialog appear.
e)Fire "ENTER" key press event.
f)Wait till spooling finish.
g)Close the document and application.
3)Update the XML with Print job info.
//Launch the file from the location specified in.
White.Core.Application application =White.Core.Application.Launch(@path);
Console.WriteLine("launch is done");
Thread.Sleep(3000);//Wait till Application Launched successfully ?
//Sending Commands to Print(to press "Ctrl+P" button).
Thread.Sleep(3000);//Wait till Print Dialog appear ?
//Sending Commands to Print(to press "Enter" Button).
//Get the current time as the document fired for print job.
_printedTime = DateTime.Now;
Thread.Sleep(3000);//Wait till spooling Finish ?.
//Closing the window.
Now the problem is for waiting case I am blindly using Thread.Sleep(With Few seconds), which is not Ideal. So I need to know How I'll fix these issues using White Framework in C#.
Can anybody help me to fix this issue please. Any help will be appreciated.
Thanks in advance
Aug 19, 2011 at 1:33 PM
Can you please send me the link for download "Core.dll"