automation

QTP: Parameterize a Database Checkpoint

I have a database checkpoint in QTP (HP QuickTest Pro); this checkpoint works if I pass it a static query, but I need to be able to pass in parameters or build the query programatically. I also know how to query the database programatically from QTP, but don't see a way to create a checkpoint based on its results. Specifically, I want...

What's a good way to deal with permissions with automated deployments across domains?

I have been working to automate some deployment processes using just Nant for the time being. Once the Nant script scripts are fairly stable and proven, I'll be looking to incorporate CruiseControl.net or similar product. With that being said, I ran into a snag today. I have a Nant script that will copy files from a network share th...

Automatically mark ASP.Net controls which have a RequiredFieldValidator on them

Is there a clean and centralized way to automatically designate a background color or other CSS property for ASP.Net controls (i.e. a TextBox) with an enabled RequiredFieldValidator? Currently I have manually set the background color of required controls to yellow. I would like to replace that with a central method so if the client requ...

Automating VB6 application with ActiveX controls

I have a VB6 application that I don't have source code. This application uses third-party ActiveX controls. I want to automate these ActiveX controls. Is it possible to get the IUnknowns or Object references? For some of these, I can get the underlying HWNDs, but from what I can tell there isn't a generic way to convert these HWNDs to th...

Different using-statements on production and developement environments

I have an annoying problem in one of my projects where the production environment uses Microsoft Office 2000 and we only have Microsoft Office 2003 in the developement environment. I use automation to do some manipulation of Word documents so to make this work in both the production and the developement environments i have to put a cond...

What is the best technology to use for automating a task using .net libraries?

Imagine that you need to develop and schedule an application/script to do the following:- Reference one or more .net assemblies Query the API, get some objects for each object call another method in the API What would you use? In the past I have created small console applications that do the above, but it seems a bit clumsy and over...

How can Hudson delete the artifacts created by my build?

Our organization's custom build tools write out a lot of intermediate data, and I'd like it if Hudson could detect which files were created as part of a build and archive those. I'm not sure if it already does so, but if it does there's no user-visible explanation of it, and certainly deleting a build does not delete its output. In det...

How to use condition in a TestGen4Web script for a child popup window?

I have TestGen4Web script for automating testing on a web-based user interface that has a popup window (hey i didn't write that ui..). In order to write a complete test script that branches the flow based on the some presence of some content in the popup window, I need to write a simple if condition that does something like if document.g...

Is there any http automation tool / library that performs http requests directly instead of automating a browser?

I'm looking for a tool / library (preferably .NET based) that does web page record/playback. I want this tool to issue http requests directly instead of automating a browser for performance reasons. Come to think of it, I'm pretty much looking for a recorder that can generate code that uses the WebClient class in .NET. All of the tool I...

Tools for automated deployments

What are the best tools out there for automated deployments of Windows Services (i.e. NT Services) and ASP.NET web sites? I know of good tools for automated builds, tests, versioning, and all that stuff, but I'm curious if there are any boiler-plate batch/PowerShell/MSBuild/NAnt/etc. scripts out there that can accomplish something like ...

Is it possible to automate SQL Server 2008 profiler?

There was a post regarding useful SQL tricks. Here I was going to mention the SQL Server Profiler tool, as it has helped me write less SQL. I would write SQL that would interrogate, understand or second guess the databases business logic. Profiler is very useful, especially where application code has embedded SQL and you want to work ...

Ruby win32ole - how to pass a VARIANT parameter?

I am trying to automate the Windows Task Scheduler using Ruby. I am using Ruby 1.8 under Windows Vista. The RegisterTaskDefintion method of the TaskFolder object takes two VARIANT parameters for the username and password. Any attempt to pass a string into these parameters results in a 'method_missing' exception: This does not work: r...

how do sites automagically grab profile pictures?

Some sites have the ability to grab your profile picture after you sign up for the first time without the user actually uploading a pic. I think stackoverflow has this functionality at sign as well....How does it work? ...

Excel automation. How to copy more than one cell?

For instance: //omitted vector<_bstr_t> cellData; Excel::_WorksheetPtr pSheet = application->ActiveSheet; Excel::RangePtr pRange = application->Cells; _bstr_t cellValue = pRange->Item[1][1]; //single cell cellData.push_back(cellValue); //omitted Without: MFC ATL Question: How to copy, multiple cells, for instance A1:B1, ...

Checking for the Variant value "Nothing"

This is something I ran into last year, and SO seems like a good place to document it :) Q: When automating Excel (/Word/...) from Delphi, how can I check if an Excel function returned the variant Nothing (as it's called in VBA)? ...

Best way to do automated clean install for Fedora Linux server ?

I have a Fedora 10 64-bit server where I want to set up a nightly fresh install. The server is an exact clone of our customer's hardware and is used for running acceptance tests. I would have liked to set this up using a virtual machine, but that's prohibited due to problems we've had with the different video and network drivers on t...

Software Automation tool

At my company, we have to fill out a daily timecard, and I want to automate it. I want to use some sort of tool that will allow me to write something like this: Launch Firefox go to www.xxxx.com/timecard Wait for page load complete In UserName box: put username In Password box: put password Press enter Wait for page load complete if ...

How to Make a Mouse Scroll Programmatically?

Related question: mouse drag & drop (identical code snippet) how do I a make mouse scroll programmatically? I've tried: SetCursorPos(32, 32); mouse_event((uint)MouseEventFlags.RIGHTDOWN,0,0,0,0); mouse_event((uint)MouseEventFlags.RIGHTUP,0,0 ,0,0); SetCursorPos(38, 38); mouse_event((uint)MouseEventFlags.LEFTDOWN,0,0 ,0,0); ...

Recursively search directories moving specified file type from one location to another preserving directory structure.

Is there some way to specify a directory (let's say "C:\images") and move every .jpg file from there to another directory (say "D:\media") but preserve the directory structure (so if the file were "C:\images\paintball\july\07\headshot.jpg" after moving it would be "D:\media\paintball\july\07\headshot.jpg")? I'm using cygwin (but would b...

How do I iterate a collection of Excel columns in C++ using Automation?

I want to do the moral equivalent of the following VBA code: For Each col In Worksheets("Sheet1").Columns # do stuff Next col I have generated MFC wrappers for the Excel type library that get me this far (the generated types all derive from COleDispatchDriver: CApplication app; app.CreateDispatch( clsid, e ); CWorkbooks wbks( a...