Browser automation [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am developing an application that will automate some tasks for me. The application needs to download an excel file, do some manipulations and write some data to the DB.
I have the excel automation and db writing code done, but I'm having some trouble with the browser automation.
What would be the best way to do the browser automation? What it needs to do is:
Go to a url
Set some dropdownlists
Click a button
save the excel file in the right place.
I have never done browser automation. What would be the best way to get this done?

Depending on the version, Visual Studio 2010 can do this, via the Test tools. (mentioned in case you have a version with the feature but are unaware of it.)
I believe you need either the Test edition or the Ultimate edition for these features.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/product-comparison

Use a browser automation tool, such as Selenium or WATIR.
These let you script most aspects of browser work (definitely going to a URL, setting form elements and clicking).

If you need full automation, please pick http://watin.org/ for example. For what you write, however, the WebRequest should be enough, you'd only have to sniff requests with any http debugger (like Fiddler) and be able to replay them with web requests.

I would recommend Selenium as well. I use version 2 (WebDriver) extensively for this type of automation. The only problem I see is that the Save File dialog is not something easily driven by Selenium. There are a couple of workarounds out there though. Does the clicking of the button open a dialog for download or is the button just a link to the url containing the download?

Why, What and How of Software Test Automation ?
very nice article see here

Related

Query on Windows forms Application c# [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to develop a desktop application. It has to connect to a website and click a 'Submit' button on one of its pages. Basically we have to read a excel sheet (contains invoice numbers),for each invoice number need to hit the 'Submit' button.
Now I have read we can use webbrowser controls , but my requirement is the website should not be opened in the browser , it should all be done internally without opening in any browser, Connect to website , fetch each number and hit a submit button.
Any pointers on this would be helpful.
it is a good idea to use web service for this IF you can deploy the web service to the website.
if not, you will have to use the web browser control. the web browser control does NOT have to be on the form. you can create a web browser object on the fly. check
WebBrowser Control in a new thread
but, web browser usually has more overhead.
instead, you can use fiddler to sniff the traffic and use httpwebrequest/webrequest class to do this.
You could use the WebRequest class to post the data. See this:
http://www.netomatix.com/httppostdata.aspx

Diff tool that can be integrated into a C# app [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a small C# app and I'd like to provide the ability to preview diffs and accept changes. My inputs are only text files. I came across some tools like kdiff3 and winmerge and I was wondering if anyone's integrated them inside a C# app and if yes, how was it done? I also came across some nice projects on CodeProject from an earlier stackoverflow question but since those projects were written in 2004, I was wondering if you have any suggestions for an open source diff and merge tool that I can integrate? Thanks!
Have you checked out csdiff ?
http://code.google.com/p/csdiff/
You might want to checkout DiffPlex. It is (amongst other things) a library that can be used to generate text diffs. It also provides some higher level classes that provide a more complete "diff model" that should be easier to use for rendering diffs in, say, a textbox.
Personally, I have only used it for minor tasks, but it looks powerful enough to handle more sophisticated scenarios as well.
Winmerge, as you mentioned, can be integrated with other apps via the command line. Here's an example of visual studio using these command line parameters to replace the built in diff client. In regards to launching winmerge itself, I found this simple example of how to call an external program from C#.

Creating a Youtube bot [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a problem that I need to solve.
I create Youtube videos and every time I'm on the upload page I have to :
remove the ".mp4" extension from every title
change my video category
put the same description in all of the videos
put the same keywords in all of the videos
So, I firstly wanted to create this bot in C#, but I would have to learn C# (I already know C++, but again, I would have to learn all the libraries in C#).
I was wondering if this bot could be created in Javascript (because I already know Javascript) or in any other language that I know (PHP, C++)?
Maybe I can create a Mozilla Firefox extension that does it for me in Javascript? As I said, could someone just tell me in what programming (or scripting) language am I supposed to write this bot?
So, as I said, I would manually log in, bot would just need to access my already opened page in Mozilla Firefox and change that four things.
Thanks in advance!
I would definitely go with javascript on this one. Take a look at GreaseMonkey - Scripting add-on for FireFox, that allows you to add custom javascript code to pages.
I would create a script that does all your needed changes when you call this script.
Or if all these things are on the same page you can use simple bookmarklet that calls javascript and changes these things for you.
I'm not too familiar with video uploading on youtube, so can't help you there, but you mentioned that you are familiar with javascript, so finding input fields with values and changing them shouldn't be too much of a hassle.

Good open source Reporting tool/framework for WPF (C#) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am looking out for a good open source Reporting tool/framework for windows based application (WPF).
The database I am using is sql server 2005.
The typical reports format which I am interested is for e.g. Trial balance, balance sheet, etc (typical banking / finance reporting application).
There should be good support for charting as well.
If anyone has any experience with reporting for WPF application, your inputs will be highly appreciated.
Take a look at http://wpfreports.codeplex.com/
Since this may form part of the answer, I thought of putting this in the answer section.
I just found this series of article
WPF multipage reports (note: original link dead, replaced with Wayback Machine link).
Thought of putting this here as this may benefit some other learner. This article walks through creating a reporting framework for LOB Apps.
As the saying goes "A Bird in the hand is worth two in the Bush", I will have a deep look at this until something else comes up with something better :)
PdfReport is a code first reporting engine, which is built on top of the iTextSharp and EPPlus libraries. It's compatible with both .NET 3.5+ Web and Windows applications.
As open source, this doesn't exist, at least not yet.
It probably doesn't exist commerical offering either. The WPF component market is just getting started.

What is the best spell checking library for C#? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What's the best spell checking library for C# / .net?
(This will be web-based, so the built in spell check for WPF won't work.)
I've made a .NET version (wrapper) of the Open Office / Google Chrome ... spell checker Hunspell. It is called NHunspell and can be used with C#/ VB / .... The Open Office hyphenator "Hyphen" is also included. All Open Office dictionaries work. It is free (open source LGPL / MPL licensed).
I have used Aspell.net before with some success.
I have used NetSpell in the past with success. http://sourceforge.net/projects/netspell/
There is a aspell .net wrapper.
http://aspell-net.sourceforge.net/
For a custom solution I created a Web Service which then wrapped the WPF libraries. This gives the ability to use the built-in spell checking with ASP.NET applications/web sites by simply calling the Web Service.
An easy to follow and basic idea for the wrapping can be found here:
http://www.quicklearn.com/blogsamples/SpellCheck.aspx
For a commercial solution:
I am currently evaluating RapidSpell and it seems be what I need. I will say that their demo install seemed to trash my third-party installs. (Something did, and I noticed it right after installing their demo. But that may have been coincidence.)
Telerik's control suite for ASP.NET comes with a spell-checker. You might check them out.
http://demos.telerik.com/aspnet-ajax/Spell/Examples/Overview/DefaultCS.aspx
You could embed the WPF spell checker using silverlight. Otherwise you might want to look at commercial products that are already available such as Telerik's ASP.NET AJAX Controls.

Categories

Resources