10 Replies Last post: Oct 15, 2008 3:05 AM by Jens Jacobi  
Eduard Beginner 3 posts since
Jul 2, 2008
Currently Being Moderated

Jul 2, 2008 3:25 AM

BaseUrl not working in selenium IDE 1.0b2?

Hello,

 

I have a strange problem with selenium ide 1.0b2. It does not seem to pick up the 'Base URL' form the selenium ide when running test cases but somehow 'remembers' the last visited page. All commands from the test case then are executed against this 'remembered' url instead of the specfied url??

 

I am using a relative path in the open command ( / ).

 

Thanks for any help in advance... 

 

--------------------------------------------------------------------

 

the testcase:

 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>homePage</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">homePage</td></tr>
</thead><tbody>
<tr>
    <td>setTimeout</td>
    <td>300000</td>
    <td></td>
</tr>
<tr>
    <td>open</td>
    <td>/</td>
    <td></td>
</tr>
<tr>
    <td>assertTitle</td>
    <td>De Telefoongids Bedrijvengids, telefoonboek, telefoonnummer en adres</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>Wie</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>Wat</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>Web</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>help</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>uitgebreid zoeken</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>Kies een rubriek</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>Kies een regio</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>Zoek in Nederlandse sites</td>
    <td></td>
</tr>
<tr>
    <td>verifyTextPresent</td>
    <td>Zoek op heel Internet</td>
    <td></td>
</tr>

</tbody></table>
</body>
</html>

Pete Smith Beginner 2 posts since
Jul 9, 2008
Currently Being Moderated
1. Jul 9, 2008 1:23 PM in response to: Eduard
Re: BaseUrl not working in selenium IDE 1.0b2?

I am having the exact same issue. The Baseurl it is remembering from when I recorded, even though they are relative and the box on the top of the ide has the new one, it is like it is missing a save button.

maxim Beginner 10 posts since
Jun 13, 2008
Currently Being Moderated
2. Jul 10, 2008 5:38 AM in response to: Eduard
Re: BaseUrl not working in selenium IDE 1.0b2?

I think that you need to specify  exact way after  "/"

William Beginner 5 posts since
Aug 11, 2008
Currently Being Moderated
3. Aug 11, 2008 6:16 AM in response to: Eduard
Re: BaseUrl not working in selenium IDE 1.0b2?

Hi all

I am relatively new to Selenium, so please forgive any fumbling in trying to describe my problem, and if I am posting in the wrong forum (please direct me to the right place to submit)

We are currently stuck using Selenium IDE Version 0.8.7 because of a problem that sounds something like the problem described in the original post...

Except that out problem is that the baseurl is not being used at all.

As I am not that familiar with selenium, I will try and show rather than describe our problem.

Take the following test for example:

 

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Logout</title>

</head>

<body>

<table cellpadding="1" cellspacing="1" border="1">

<thead>

<tr><td rowspan="1" colspan="3">Logout</td></tr>

</thead><tbody>

<tr>

<td>open</td>

<td>/shared/lopage.aspx</td>

<td></td>

</tr>

<tr>

<td>verifyTextPresent</td>

<td>You have signed out. </td>

<td></td>

</tr>

</tbody></table>

</body>

</html>

 

This test is run as part of a suite, triggered from the command line by the following, formatted to make it a little easier to visually parse (I hope!):

 

"C:\Program Files\Mozilla Firefox\firefox.exe"
-chrome
"chrome://selenium-ide/content/selenium/TestRunner.html
?test=file:///D:\dev\CC3\TestCore\Selenium\WarmUp.xml
&baseURL=http://dev.test.comk/CC3/testSys/testWeb
&userExtensionsURL=file:///D:\matrixdev\CC3/TestCore/Selenium/UserExtensions/site-user-extensions.js
&auto=true
&resultsUrl=http://localhost/ccnethandle/handlewarmup.aspx"

 

We get errors that imply that the baseurl is being ignored or is not being set at all, and so the tests, of course, fail:

 

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /share/logout.aspx


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

 

I checked the issue tracker and did not see anything that seemed related to this problem... should I add this issue to tracker?

Thanks

Jens Jacobi Beginner 2 posts since
Aug 21, 2008
Currently Being Moderated
4. Aug 21, 2008 4:17 AM in response to: William
Re: BaseUrl not working in selenium IDE 1.0b2?

I have the same problem.

 

When I use the  baseUrl="http://server/path1"   and with the command "open /path2/"  the browser send a "Get  http://server/path2/" in place off "http://server/path1/path2/"

 

Thanks

D_Tester Beginner 7 posts since
Aug 25, 2008
Currently Being Moderated
5. Sep 6, 2008 7:57 PM in response to: Eduard
Re: BaseUrl not working in selenium IDE 1.0b2?

Hi Eduard

 

The IDE does not appear to store or use the baseurl if it is opened in the side bar or in any extensions windows/bars.

 

If you always open it from the tools->IDE the base url will work correctly.

 

Regards

Donald

WRose Beginner 2 posts since
Sep 5, 2008
Currently Being Moderated
7. Oct 8, 2008 2:45 AM in response to: Eduard
Re: BaseUrl not working in selenium IDE 1.0b2?

Hi,

 

I disagree with D_Tester, as I never use the side bar to load the IDE , but  have experienced the same problem.

I have however discovered the following:

I am using HTML format and if you view the source of your test case you will notice that the line ->  <link rel="selenium.base" href="" /> needs to have the href="", however in the offending test cases href is populated with a harcoded URL like->  href="http://www.test.lan/cgi-bin/login.pl". So by simply removing the hardcoded URL you will be able to reference the Base URL once again.

 

Hope this helps

WRose Beginner 2 posts since
Sep 5, 2008
Currently Being Moderated
9. Oct 8, 2008 4:26 AM in response to: Eduard
Re: BaseUrl not working in selenium IDE 1.0b2?

Hi Eduard,

 

I am still fairly new to selenium so my knowledge is a bit limited ...:(

I create my test cases through the IDE and save them in HTML format just as you do. Each new test case is prepopulated with:

 

<?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">

<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>

 

</tbody></table>

</body>

</html>

 

And as you can see the <link rel="selenium.base" href="" /> is automatic...

Can't tell you much more

 

Thanks

Fatima

Jens Jacobi Beginner 2 posts since
Aug 21, 2008
Currently Being Moderated
10. Oct 15, 2008 3:20 AM in response to: Jens Jacobi
Re: BaseUrl not working in selenium IDE 1.0b2?

Hi

 

I have detected, that the problem is the backslash, it works different form Selenium 0.87 to 1.0b2.

 

The baseUrl must end with a backslash, the openURl  must begin without backslash in 1.0b2

 

I mean (in Version 1.0b2):

 

NumberbaseurlOpenresult
1http://server/path1/subpath2/http://server/subpath2/
2http://server/path1subpath2http://server/subpath2
3http://server/path1/subpath2http://server/subpath2
4http://server/path1subpath2/http://server/subpath2/
5http://server/path1//subpath2/http://server/subpath2/
6http://server/path1/subpath2http://server/path1/subpath2
7http://server/path1//subpath2http://server/subpath2
8http://server/path1/subpath2/http://server/path1/subpath2/

 

Only  case 6 and 8 this works like 0.87

 

Jens

 

I generate my testcases from big excelsheets, not from the IDE

More Like This

  • Retrieving data ...