Navigating website with application - c#

I'm looking to make a C# application to automate some processes for me. One of which would be navigating a few websites that I frequent, such as grooveshark. I'd like my application to be able to log me into the website and search for/play a song.
I've done some googling on the topic and came across something called selenium. I was wondering if this was the best tool for what I would like to accomplish or if there is another option that would be a suit my needs better?
Thanks in advance!

In order to automate your process , you can use Microsoft Test Manager , who is tool about testing and generating code
On Microsoft Test Manager 2012 , for example you have new functionnality such as Exploratory Test, the process is you explore your application and generate your test.
Link : http://msdn.microsoft.com/en-us/library/vstudio/hh191621.aspx
After creating your tests, you can generate Coded UI Test and include in your build process
Note : you must use Team Foundation Server or Service in order interact with Test Case WorkItem

Selenium will do fine, unless the sites use Flash. If they do, you are pretty much stuck.
https://code.google.com/p/selenium/
http://selenium.googlecode.com/git/docs/api/dotnet/index.html
http://docs.seleniumhq.org/docs/03_webdriver.jsp
I would read up on Selenium and come back when you have a specific problem.

If you have Visual studio Premium or greater I would suggest Coded UI. I would also suggest CUITe http://cuite.codeplex.com/ as it simplifies the code.

It definately depends on what your automation is going to be able to. I don't know Selenium at all. I think it's for recording certain actions on a website in a certain order. Though you will only be able to automate the process as far as the website (the actual client) capabilities offer.
If you'd like to build some different, more advanced behaviour the client doesn't provide yet, you'd need to build your own client. That'd need some backwards engeneering. That'd be the case for e.g. automating browser games. Usually a browser game client doesn't provide scanning certain amounts of players and automatically comparing them to your own player profile, so building this feature on your own would be the only possible solution.

Related

How do you prompt a user to choose a series of points from an external application in Revit 2014?

Stack,
I'm developing an application to work with Revit 2014. Whether it will run inside of Revit or outside as an external application is yet to be determined. At this point, I'm attempting to prove the concept using commands through the add in tab. The goal is to allow the user to create conduit in Revit through an external interface, but I can't seem to find a method similar to AutoCAD's 'Pick Point'. I'd like for the user to select a point, or series of, and have the XYZ(s) communicated back to me via the API. I'll use those points to perform some calculations, adding/filling shared parameters based on the work being done, then draw the conduit for them, just as Revit would. I know that Revit is lacking in their Electrical API, so if it has to be done with a pipe or placeholder and then converted to a conduit, that's fine too.
I've successfully created conduith/pipe/pipe placeholders with known XYZ's (Hardcoded) but the idea is have the user choose the XYZ. Am I way off base with this? Any help is greatly appreciated.
The development is being done with the Revit 2014 API, Visual Studio 2010 (Express for now, with intentions to jump to Ultimate when funding comes through) and believe it or not VB6.
Thanks in advance,
Runnin
Have you looked at using the Selection.PickPoint() Method? Something like:
XYZ pickedPoint = commandData.Application.ActiveUIDocument.Selection.PickPoint();

Desktop Application Crawler

Good Morning,
I am looking at the feasibility of generating a Desktop Application Crawler. This application crawler would work in a similar way to a web crawler - it would interrogate the application to obtain a UI structure. To fit with other ongoing projects this would be coded in C#.
The program would be able to get Window and Control properties and generate a list of which controls are present on which Windows.
Is such a thing possible? - I assume it is as projects like Microsoft's UI Spy do a similar job. The output would be a simple XML format.
Thanks in Advance,
JH
Also it not very clear what you exactly mean, but for investigating the content of specified WinsowsApp written in .NET you can use ManagedSpy.
Is you want ot have some mertics information delivered to you in a way of service you can relay one Desk Metrics (they have a free of charge plan too)
If it's not what you're asking for, please clarify.

C# 2010: Deploying Multiple Apps..Need Sure Fire Way To Update

For starters I have whored myself out to the Internet in general as far as search is concerned. Got nowhere and am pretty Google proficient. Maybe I missed something..Enough of that.
As mentioned above C# 2010 (3.5->4.0 running on Win7x64 but would like the app to be fully compatible with XP/Vista). Dealing with XP(w/SP3) to Vista/7 clients. Working on an app that will allow my company to more easily connect to their local desktops via RDP. My app is awesome as far a usability, but eventually, my programming will catch up to me, bend me over, and do me hard.
I am looking for a sure-fire way to update the main app. I am deploying a secondary app to pull this off (app downloads updateApp from developer website if xml file has newer version, updaterApp updates main app; main app updates the updaterApp--if needed).
Looking for reinforcement or better ways to accomplish this as the app depends on admins + (possible) SQL + AD + SMB + SSH auth.
Things I have run into:
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/ (at this point, what I like)
http://digitalformula.net/technical/c-self-updating-application-without-clickonce/
http://www.eggheadcafe.com/articles/pfc/selfupdater.asp
So that's what I am looking at. Would love to find the right solution with details/great code/examples. I am MOST WORRIED about admin access in Vista/7 on the 'Program Files' directory look forward to the discussion. Hope all of the info is here. Thank you so much in advance!
What about clickonce?
I read good and bad things about ClickOnce. One of these days I will sit down and figure out how it works. For now I went with update code inside the main application. Its pretty kewl. It starts a new thread to download and run the MSI package. I found it here.
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/
Hope that helps someone looking to spin your own. I liked this approach because I did not have to create a second program.
Use clickonce
.net has this built in, we use it for our LOB apps, works fine.

Can an exe compiled from C# be integrated into a website?

I'm a beginner in programming. I've just made a program called "Guessing Game". And it seems to work fine. Can I integrate it into a website? The CMS that I'm using is Mambo.
===
additional info's
Thanks for all your suggestions.
I still don't have any background about Silverlight, WPF and Java Script which I think sounds good. I'm using Windows and I programmed my "Guessing Game" from Microsoft Visual Studio 2008 and it's using Window application forms.
Yes I guess, for the moment I let it be and start to learn Silverlight or Java Script so that I can integrate it on my website:-)
Thanks for all your input guys:-)
Cheers
A standalone executable cannot be directly integrated into a website. You have a few choices though:
Allow your users to download the executable and run it locally for themselves
Rewrite your program in JavaScript to have it run directly inside of an HTML page, though this could obviously involve a fair amount of reworking
Use Microsoft's Silverlight technology, which allows you to code in C# and produce a web-based frontend similar to Adobe Flash. Your program logic should remain the same and you should only have to change the UI code. In fact if you're already using WPF for the front end, the transition will be even easier.
There are several questions that you still need to answer.
What is your server running? If its not Windows, your exe will not run at all unless it is compatible with Mono or a similar framework for your server's operating system.
How does your "Guessing game" interact with the user? If it is through a WinForms GUI, it will you will not be able to use that GUI on the web. If your game is a WPF application your easiest route may be to port it to Silverlight and serve it up on a web page.
It is typically not trivial to make a regular windows application run in a web environment since on on the web you are really running in the browser, not on Windows.
Yes - in general, when you're talking about software, anything is possible. The question is, how difficult will it be?
To understand that, you have to give us more details about "Guessing Game" including how it is designed, what it's interfaces are, how readily extensible it is, and how prepared you are to change or extend it.
For example, if it is a Windows Forms GUI app, then it will be diifficult to integrate into a web app. If it is a console app, then it will be a little easier. If you can modify it to run as a Windows Service, then a little easier. If you can modify it to accept input from the network (as opposed to getting input solely from the keyboard + mouse), still easier.
You may be able to use reflection to load your assembly into the web application, but most likely, the answer is no.
Your best solution is probably to re-write the game in javascript.
The short answer to your question is now. I'm presuming that since you're running Mambo you're web environment is a LAMP stack. However, you're "Guessing Game" is most likely a Windows application from the sound of it. For a beginner in programming, there is no integration path you're going to be able to take that will allow you to have your game running on your website.
However, here are avenues you can take, which will require a significant amount of time to learn. I'm not saying you shouldn't take time to learn, by all means you should! I'm simply trying to illustrate the fact that this is not something that is going to be doable in a couple of hours.
Silverlight - allows you to run C# code with a WPF like interface on your client's browser and can integrate with your web site through javascript.
Let your client download it from your website and run it off of their PC. This would actually be fairly trivial and would be your quickest option, but it sounds like it's not the kind of integration you were looking for.

What is a good project to learn Windows Forms programming in C#?

I want to learn c# so I can do some desktop developing. I've developed command-line C# applications and wanted to expand to Desktop applications.
I was thinking of create a screenshot tool like Jing or maybe a plugin for outlook to sync contact information with a service like Google.
What are your thoughts? My past experience is with web applications built in PHP.
I would try to start with something fairly contained, which only touched a few new technologies. For instance, if you want to learn Windows Forms, write something which uses that but doesn't need to talk to Outlook, Google, or the Win32 API. Once you've got the hang of Windows Forms, try one extra technology - try displaying your Google Contacts and do offline editing, for example. Then add another technology... etc.
In my experience it's hard enough to learn one new technology at a time - but that's far quicker than trying to learn two or more in one go. You inevitably get to the stage where you don't know where the problems are, and you have no confidence in any of your code because it's all new. This is particularly important if you're still fairly new to the language as well - although I'm glad to hear you started with some console apps :)
Sorry if that sounds like I'm being a wet blanket, and I realise it sounds like you'll take far longer to get to something useful that way, but I think you're more likely to be successful in the long run.
Find something that most importantly interests and excites you. If you pick something too boring that you don't care about you'll only give up before you get anywhere, and won't benefit at all. Don't do a rubbish project for the sake of learning a language. Do a good project, and do it in a new language as a side effect.
Make a notepad clone. While being fairly simple it will give you a primer in some basic Windows Forms mechanisms such as using menus and reacting on their events, getting input from controls for storage on disk, reading from disk and updating controls, using Docking and Anchoring and so on.
Twitter clients are the new hello world.
I read that somewhere the other day. I can't personally comment on its fitness for your goal.
Do something that you did before, but in another language. Then you won't have to think about most of the architecture of the particular task again, but you'll be able to compare the languages, the frameworks and their approaches.
I bet you'll learn a lot about your previous language as well doing this excercise.
A good project would be a simple windows form. You simply have a chance to put everything together. Or at least see a bigger picture.
You can make it as complicated as you want, without sticking to one area.
Suggesting a specific project is pointless. Think of something that interests you, or an application you want/need, then start making it - searching Stackoverflow/Google/MSDN/etc whenever you can't guess how to do a specific task.
For example, I had to make kiosk application that allowed customers to signup to a companies mailing-list. I tried using the Ruby framework Shoes, but it didn't work correctly on the laptop the application was to run on. Visual C# seemed like a better fit, and would almost certainly run correctly..
So I installed Visual C# Express, added a few labels and a button. I double clicked the button, and realised I didn't know the code to create a new WinForm window.. So I searched Google for "visual C# open new dialogue" or something, and I found out I had to add a new form, then call NewForm newwindow = new NewForm(); newwindow.show(); or similar.
Then, I added the username/email fields, then searched for "how to display an alert box" and checked I could display the form values.
That all worked, so now I had to decide how to store the emails. I had heard good things about LINQ to SQL, so looked into that, decided I wanted to use SQL Server CE (so I didn't have to install/run SQL Server on the laptop). That resulted in more searching around for how to make LINQ to SQL work with SQL Server CE..
Finally, I wanted to have a configuration panel to change the title/button strings etc (accessible via a certain keyboard shortcut).. A Google search revealed how to catch keystrokes, and I asked a Stackoverflow question about representing the settings (using a PanelView or something)
..anyway, the point of that slightly long, rambling and not terribly interesting story is.. You can learn many new technologies at once, as long as you have a specific application in mind (and you're determined to finish it!)
I learned C#, WinForms, SQL Server CE, LINQ to SQL, and simple application publishing stuff in a day - creating a functioning, useful application in the process - simply with a combination of prodding around, Google searches and Stackoverflow..

Categories