Archive for February, 2006

My first wordpress post

28 February, 2006 Comments off

I’ve defected from, so far I’m impressed. Categories, stats, lots of nice skins and the import feature just saved me a boat load of time!

Categories: General

Functionally testing SAP Enterprise Portal using Watir

28 February, 2006 Comments off

It’s taken about a day but I’ve managed to get some functional tests running using Watir. It’s not been as easy as it could have been mainly due to the way the SAP Enterprise Portal uses iFrames and the anti cross site scripting in Internet Explorer. I got there in the end though! I can now logon to the portal and functionally test iViews using a fairly simple Watir (Ruby) script:

def logon

if $ie.contains_text("Log Off")

$ie.text_field(:id, 'logonuidfield').set($user_id)
$ie.text_field(:id, 'logonpassfield').set($password)
$ie.button(:name, 'uidPasswordLogon').click

A couple of things to note:

Talk to the iView directly
Due to the use of iFrames and IE anti cross site scripting accessing an iView which is embedded in a portal page is not possible with the current (1.4.1) version of Watir. Simply get the url of the iView and access it directly.

Problem with HTMLB Text Fields
ID’s and Names of HTMLB Text Field controls appear to be generated on execution, so I had to write a little script which would find a text field using the title property:

def find_text_field_by_title(my_title)
found_text_field = nil

$ie.text_fields.each do |tf|
if tf.title == my_title then
found_text_field = tf

raise "No text field found with title = " +
my_title if found_text_field.nil?

return found_text_field

NOTE: I’m sure my Ruby/Watir scripts leave a lot to be desired, I don’t really know who to code in Ruby but they do seem to work!

Searching Google for Watir help

27 February, 2006 Comments off

Having trouble finding help on Watir?

Try the following in google: "[Wtr-general]" your search

Categories: Watir

Installing Watir via the gem utility

27 February, 2006 3 comments

The install should be as simple as dropping into dos, cd to your Ruby folder and run the command:
gem install watir

Unfortunately it wasn’t that simple for me, we work via a proxy here so I had to tell the gem utility about it.

Running gem install when you are behind a proxy

Set the HTTP_PROXY environment variable.

set HTTP_PROXY=http://mycache:8080

You can now run:
gem install watir

Or you can pass the proxy information as a parameter to gem via the -p switch:

gem install watir -p http://mycache:8080

Gem will now go off download and install the latest Watir package, version 1.4.1 in my case. Be patient this can take some time depending on server load.

Categories: Watir

Watir – Testing your website

27 February, 2006 Comments off

I am hoping to use this software to test my web developments, from what I have read it looks very promising.

“WATIR stands for “Web Application Testing in Ruby”. Watir
is a free, open-source functional testing tool for
automating browser-based tests of web applications. It is pronounced water.”

The install…

Using the Ruby One-Click installer for windows (version ruby182-15.exe), just run standard install accepting all defaults.

NOTE: I tried the final version of Ruby 182-14 and had lots of install problems so use at least version 182-15!

Using the Watir One-Click installer for windows (version watir-1.4.1.exe), just run standard install accepting all defaults.

Now onto learning what can be done with this thing…

User Guide

Ruby Cheat Sheet

Watir Cheat Sheet

Categories: Watir

Removing PAR files from the SAP Portal

23 February, 2006 Comments off

So you’ve accidentally uploaded a PAR file to the portal eh?

Here’s how to get rid…

(Top Menu) Java Development -> (Left Sub Menu) Tools -> Portal Archive Deployer&Remover

(Main Page) Archive Remover

Select the PAR file you wish to remove from the drop down list and click the “Clean” button

You should now see a message along the lines of:

INFO: Received clean-up request for application: “MyApp”
INFO: MyApp has been successfully removed from the PCD.

The PAR is no more.

Categories: SAP Enterprise Portal

SAP Portal PAR locations

23 February, 2006 Comments off

To find your PAR files once they are uploaded to the portal:

(Top Menu) Java Development -> (Left Sub Menu) Tools -> Portal Support Desk

(Main Page) Portal Runtime -> (Main Page) Browse Deployment

Now move to:


You should now see a BIG list of files.

This is where your PAR files live!

Categories: SAP Enterprise Portal