views:

949

answers:

1

I am trying to test my application using Selenium tool via the Hudson plugin (the one called sleniumhq plugin).

As a proof of concept I decided to make a very simple test targetting google, the test is the one below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1  /DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"&gt;
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="selenium.base" href="" />
    <title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
    <thead>
        <tr><td rowspan="1" colspan="3">New Test</td></tr>
    </thead>
    <tbody>
        <tr>
        <td>open</td>
        <td>/</td>
        <td></td>
        </tr>
        <tr>
        <td>waitForPageToLoad</td>
        <td>3000</td>
        <td></td>
        </tr>
        <tr>
        <td>type</td>
        <td>q</td>
        <td>selenium rc</td>
        </tr>
        <tr>
        <td>click</td>
        <td>btnG</td>
        <td></td>
        </tr>
    </tbody></table>
</body>

This test opens Google then searches for selenium rc.

When I run it using Hudson I get HTTP error 403 in the opened browser. There is no specific error raised by Hudson or Selenium.

Here is my Hudson configuration:

browser : *iehta

startUrl : http://:4444/selenium-server/

suiteFile : suite.html (suite pointing to the test described before)

resultFile: result.html

other : -timeout 5 -debug -browserSideLog -ensureCleanSession -trustAllSSLCertificates

htmlSuiteRunner : C:\selenium\selenium-remote-control-1.0.1\selenium-server-1.0.1\selenium-server.jar

Do you guys have already faced such an issue? Is it linked to user rights definition or something?

Thanks in advance for your help!

+1  A: 

I'm not familiar with Hudson, but that startUrl doesn't look right. Are you meant to have the IP address of the Selenium RC server in there? For example: http://10.100.1.1:4444

Also, if you are using the latest version of Selenium (1.0) then the browser should be set to '*iexplore' for Internet Explorer in HTA mode.

Dave Hunt
Thanks for your answer. Actually there is a mistake in my post. I was using the selenium server IP address as you mentionned.Setting the base Url used by Selenium IDE in this startUrl field is working for me! I mean I have to set as startUrl the URL of the website I want to test (ie: http://www.google.fr in my case)With this new config, no more 403 error ;)Thanks for your answer.
reef
You're welcome. Glad I was of some help.
Dave Hunt