Issue Details (XML | Word | Printable)

Key: SRC-234
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Dan Fabulich
Reporter: Bernhard Schmalhofer
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Follow links with '_self' target

Created: 19/Mar/07 11:14 AM   Updated: 18/Nov/08 01:56 PM   Resolved: 04/Jul/07 01:21 AM
Component/s: None
Affects Version/s: 0.9.2
Fix Version/s: None

Environment: Linux, Firefox 2.0.0.1. selenium-server-0.9.1-20070317.181334-120-standalone.jar


 Description  « Hide

Hi,

during of an in-house frame-based application I ran into an issue with links that have the target '_self'.
It looks like Selenium RC is not aware that '_self' means the current frame or window.

I have boiled it down to small example:

/noaut/test_target_self.html:

<head>
<head>
<title>Test target _self with Selenium RC 0.9.1</title>
</head>
<body>
<a href='test_target_self.html' >without target</a>
<a href='test_target_self.html' target='_self' >with target</a>
</body>

Perl 5 test script:

use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";

my $sel = Test::WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => 'http://test.example.org:8824' );
$sel->open_ok("/noauth/test_target_self.html");
$sel->title_is("Test target _self with Selenium RC 0.9.1");
$sel->click_ok("link=without target");
$sel->wait_for_page_to_load_ok("30000");
$sel->title_is("Test target _self with Selenium RC 0.9.1");
$sel->click_ok("link=with target");
$sel->wait_for_page_to_load_ok("30000");
$sel->title_is("Test target _self with Selenium RC 0.9.1");

Unexpected output:
bernhard@fumarat:~/devel/selenium/bmax_testing$ prove test_target_self.t
test_target_self....ok 1/0# Error requesting http://localhost:4444/selenium-server/driver/?cmd=click&1=link%3Dwith%20target&sessionId=566036:

  1. ERROR: Window does not exist
  1. Failed test 'click, link=with target'
  2. in test_target_self.t at line 16.
    test_target_self....NOK 6# Error requesting http://localhost:4444/selenium-server/driver/?cmd=waitForPageToLoad&1=30000&sessionId=566036:
  3. Timed out after 30000ms
  1. Failed test 'wait_for_page_to_load, 30000'
  2. in test_target_self.t at line 17.
    test_target_self....ok 8/0# Looks like you failed 2 tests of 8.
    test_target_self....dubious
    Test returned status 2 (wstat 512, 0x200)
    DIED. FAILED tests 6-7
    Failed 2/8 tests, 75.00% okay
    Failed Test Stat Wstat Total Fail Failed List of Failed
    -------------------------------------------------------------------------------
    test_target_self.t 2 512 8 2 25.00% 6-7
    Failed 1/1 test scripts, 0.00% okay. 2/8 subtests failed, 75.00% okay.
    bernhard@fumarat:~/devel/selenium/bmax_testing$

I hope that helps,
Bernhard



Sort Order: Ascending order - Click to sort in descending order
Zackary Geers added a comment - 24/Apr/07 01:47 PM

I had the exact same problem, luckly I was able to remove the '_self' target from my code.


Zackary Geers added a comment - 24/Apr/07 01:57 PM

There is a patch in SEL-417 for this issue.


Dan Fabulich added a comment - 04/Jul/07 01:21 AM

This is a Selenium Core bug SEL-417. We can't do anything about this on the RC side of the code.