|
use Process object with system.diagnostics.processstartinfo, capture output using redirect standard output, translate and use them
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
Thank you!
I will have a try!
Greetings
Zaphod
|
|
|
|
|
I get error message related to this line: 'IE iepopup_1 = IE.AttachToIE(Find.ByUrl("http://site.fi/page.htm"));'
Any ideas?
Exception WatiN.Core.Exceptions.IENotFoundException was thrown in debuggee:
Could not find an IE window matching constraint: Attribute 'href' with value 'http://site.fi/page.htm. Search expired after '30' seconds.
using System;
using System.IO;
using System.Threading;
using WatiN.Core;
using WatiN.Core.DialogHandlers;
using WatiN.Core.Exceptions;
using WatiN.Core.Interfaces;
using WatiN.Core.Logging;
namespace TestSpace
{
public class TestClass
{
[STAThread]
static void Main()
{
testing();
System.Environment.Exit(0);
}
public static void testing ()
{
IE ie = new IE("http://site.fi");
ie.GoTo("http://site.fi/");
ie.Link(Find.ByUrl("http://site.fi/link")).Click();
ie.TextField(Find.ByName("username")).TypeText("user1");
ie.TextField(Find.ByName("password")).TypeText("user1");
ie.Button(Find.BySrc("http://site.fi/button.gif")).Click();
ie.Link(Find.ByUrl("http://site.fi/link_to")).Click();
ie.Link(Find.ByUrl("http://site.fi/page.htm")).Click();
IE iepopup_1 = IE.AttachToIE(Find.ByUrl("http://site.fi/page.htm"));
LogonDialogHandler dhdlLogon = new LogonDialogHandler("popup_user","popup_user");
iepopup_1.AddDialogHandler(dhdlLogon);
iepopup_1.Close();
}
}
}
|
|
|
|
|
keijo_cyrpa wrote: WatiN
What is this, and why do you expect us to know about it ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I think the general premise here is that if you don't know about something, it's your choice to learn about it, or let someone who does know about it discuss it.
I'm having a similar issue with WatiN ("Could not find an IE window matching constraint") and was hoping someone might have provided a more enlightened answer.
Don't worry, nobody lives forever.
|
|
|
|
|
keijo_cyrpa wrote: I get error message related to this line: 'IE iepopup_1 = IE.AttachToIE(Find.ByUrl("http://site.fi/page.htm"));'
Well I have no idea what this component does.
But my huess by looking at the this line and your exception message is that, for whatsoever reason this url was not reachable or invalid.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Smug mode on. I know what it is - it's a testing framework for web apps. Smug mode off.
|
|
|
|
|
Hai,
Is it possible to capture the information of mailing activities and IM activity from various mail services using C# programming? if so please give me the solution
|
|
|
|
|
I think you can use Hook to find out the activity .
say you can monitor a yahoo IM by injecting a dll hook to it
all you need to know is the class which creates the yahoo main window
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
|
Well, given that you're in a C# forum, you could try posting about C# code ? Or go to the C++ forum ( Visual C++, NOT C++/CLI )
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
You are in the wrong forum.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all,
I have an .exe which is working fine. Now I have to make a schedular programatically which will invoke the .exe(console app) every day at 6.00PM and performs the operation and then quit after completing the job.
Kindly help me in doing that....
Thanks
|
|
|
|
|
Why don't you use windows scheduler ?
|
|
|
|
|
|
you can make a windows service which will create a process for your exe
eg:-
STARTUPINFO si = { sizeof(STARTUPINFO) };
si.dwFlags = STARTF_USESHOWWINDOW;
PROCESS_INFORMATION pi;
CreateProcess(NULL, _T("application path"), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
Quit posting the same question. Just use the Windows Task Scheduler.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi All...Can any1 assist plz...i hav a main page "frmMain.aspx" and this page calls popup via window.open called "frmPopup.aspx".
i want the popup page to force a postback on the main page..the code i am using is:
string scriptString = "<script language=JavaScript> window.opener.document.forms(0).submit(); </script>";<br />
if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptString))<br />
{<br />
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "submitScript", scriptString);<br />
}
can any1 tell me wat im doing wrong?
living life on the flip side
|
|
|
|
|
Agweet wrote: can any1 tell me wat im doing wrong?
Not asking in the ASP.NET forum ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
its a codebehind call!
living life on the flip side
|
|
|
|
|
You are supposed to post your question in a correct forum. This is what he meant.
|
|
|
|
|
Ahhh, I hate univoters. 5ed
|
|
|
|
|
Agweet wrote: can any1 tell me wat im doing wrong
Yes, some keys on your keyboard appear to be stuck, and others seem to be in the wrong place altogether.
|
|
|
|
|
ROTFL !!!
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi All,
Iam using WMI to get the required printer job information.Here Iam using "Select * from win32_Printjob" from ManagementObjectQuery. In this Iam using thread.sleep for 10 seconds to get the pages,size.
Without thread.sleep Iam getting pages, size as 0.
But this sleep for 10 sec mechanism works only for small documents.
When I get large document It is unable to get the no.of pages,size(just showing them as 0).
1.Is there any way to get the correct pages,size of print document?
2.Is there any way to know that a document came for printing is totally read by spooler?
3.I think after reading all the data only it will go for printing.,am I right or wrong?If right,then how to know that status ready for printing?
Kindly help me
Thanks
|
|
|
|