|
Hi Guys,
Do you have any idea on how to automate website using c# windows form? If so, can you provide me. I am a new bee in automation and I want to automate my testing in the website.
Thanks,
Nico
|
|
|
|
|
Create a new project, throw a WebBrowser component on there, and <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.navigate.aspx">Navigate</a>[<a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.navigate.aspx" target="_blank" title="New Window">^</a>] where you want.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi everyone, I have a problem, we borrow our clients laptops in our company for a short time. Users should be the local admin of the computer in order to add/remove programs they need. However, some of them didn't return the laptops in time so, we decided to write a program that locks the computer on date that we give before. I have one windows service, one form application which interacts with user and communicates with the service. While I testing, when I kill my program or my service, I give bsod but, when I try to disable the service and restart my computer, it doesn't run anymore. I need a method to prevent disable my service. Even my form application gets killed, my service has to run in background. Thanks.
|
|
|
|
|
candogu wrote: we borrow our clients laptops in our company for a short time
Presumably you mean that you lend them to your clients.
candogu wrote: we decided to write a program that locks the computer on date that we give
before
Seems like an unlikely and complicated solution. Why don't you just send them a bill, with an appropriate markup, as the replacement cost of the computer? The markup should be high enough that it allows you to buy a new computer and cover collection agency costs. Presumably the clients are in fact capabable of covering that cost or you shouldn't be lending it to them in the first place.
candogu wrote: I need a method to prevent disable my service
I am rather certain that is impossible. You can however make it difficult.
But really will this fix your problem? Are you sure the clients will return the computer then? What stops them from just throwing it in the trash?
|
|
|
|
|
I'd boot in safe mode and install my own "fun.exe" before returning it to you
While there's few valid reasons to be late in returning the laptop, there's none in locking it. You have a list of people whom you lent it to; send them a mail and charge them a small fee for each day that it's not returned.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Since everyone is an admin, you can't, really.
|
|
|
|
|
ThePhantomUpvoter is that ur account
|
|
|
|
|
I think I speak for everyone when I say "What?"
|
|
|
|
|
I think this may be an exercise in redundancy.
He is asking everyone if the ThePhantomUpvoter account is your account, but there is only one account that can answer this, ThePhantomUpvoter. A bit like asking all the integers if they are the number 17. The question might even have deep existentialist qualities, but if it does, I've failed to discern them.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Yes, it isn't mine.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
sorry sir Thomas
but i want to send an Email to this person so he could help me with my code
and i don't know how to send it to him 
|
|
|
|
|
youshy wrote: i want to send an Email to this person so he could help me with my code
That's generally frowned upon by the recipients. It's unwanted requests like this that led to me removing the option to email me.
|
|
|
|
|
thank you 
|
|
|
|
|
It is not my account. I certainly wouldn't welcome people e-mailing me directly for help. e-Mailing like this also goes against the purpose of Code Project, as the idea is to share problems so that other can see them and hopefully use any answers given.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
thank you 
|
|
|
|
|
Hi all,
This is more of a WMI question than C#, but for lack of a more appropriate forum I am hoping someone here will know the answer.
I have a USB printer connected to my computer, and I am trying to retrieve the USB port ID for it in a C# application (i.e VID/PID).
I pulled the printer details from the WMI Win32_Printer class. The problem is the port field shows USB001 (which from what I understand is just a virtual allocation).
I discovered the actual USB port was a parent device called 'USB Printing Support', and the printer USB device was a child of that.
I pulled the WMI class Win32_USBControllerDevice and thought I found the relationship I need:
Antecedent: \\MARK-PC-MKII\root\cimv2:Win32_USBController.DeviceID="PCI\\VEN_8086&DEV_1E2D&SUBSYS_84CA1043&REV_04\\3&11583659&0&D0"
Dependent: \\MARK-PC-MKII\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_04A9&PID_271A\\0000A1A6Q2NI"
Antecedent: \\MARK-PC-MKII\root\cimv2:Win32_USBController.DeviceID="PCI\\VEN_8086&DEV_1E2D&SUBSYS_84CA1043&REV_04\\3&11583659&0&D0"
Dependent: \\MARK-PC-MKII\root\cimv2:Win32_PnPEntity.DeviceID="USBPRINT\\CANONLBP6000/LBP6018\\7&2509A3F3&0&USB001"
Unfortunately the PCI bus that both devices are related with is also related with a bunch of other devices, so I am not sure this approach will work.
Does anybody know a way I could programically relate my printer device with its parent USB device (Preferably one which I could pull the USB device info once it has been related to the printer)
Note:
If I open the properties->details window for the 'USB Printing Support' device, there is a property called 'Children' which would be perfect... I just don't know how to get to it... ;-(.
Thank you.
Mark Brock
I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking
|
|
|
|
|
I cant say I remember the code exactly, but I think you can get all the device id by the use of some dll. Sorry for the vague answer but I think youll find the related code in the book USB complete by Jan Axelson.
|
|
|
|
|
How to Import a doc file in sql server in windows application...??
|
|
|
|
|
What do you mean by 'import' here; do you want to use the contents of the doc file to populate some tables in your database, or are you just interested in storing the file as a data item?
Use the best guess
|
|
|
|
|
I've inherited a project that includes unit tests written in this framework. I know little about c# and nothing about nunit. I'm told that I can't just run the test project (as it builds to an assembly, not an exe) but need to use a third party tool to run the tests. I tried resharper but uninstalled it as it changed my VS 2012 shortcuts without asking me. Then I tried NUnit itself but for some reason unknown to anyone here it is not possible to debug the tests using NUnit.
I'm just stunned at how bad this appears. Surely tests lose most of their value when they are hard to execute?
Is it possible to add a Main() to my test project and just run the tests?
|
|
|
|
|
There's a Visual Studio addin for NUnit that would allow you to debug the tests. Source[^].
A left field idea, if you don't want to pay for this, is to create a Console project that simply spawns NUnit.exe. If you pass in your projct as a command line argument to that, then you should be able to set breakpoints.
An alternative to this - open your project in NUnit and, before running the tests, attach the debugger to NUnit.exe. You should be able to debug your code this way.
|
|
|
|
|
I'm just used to a c++ system where test projects are runable. Ease of running tests is important I think.
In the end I wrote something with the nunit api that given an assembly path will load it, run the tests and write output to the console.
|
|
|
|
|
It is definitely possible to debug Nunit.
Just attach the NUnit UI to your program when you run it from Visual Studio.
If you are very unhappy with Nunit, you can consider using Visual Studio's Unit Testing Framework[^].
|
|
|
|
|
|
Debugging when running nunit.exe is a bit of a fiddle, you have to attach the debugger to the process. I believe there's a VS plugin these days though that allows you to execute NUnit tests with debugging enabled.
|
|
|
|