Error in Selenium sample tests

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in Selenium sample tests

GW-5
When I try to run one of the sample tests that are included with Selenium:

C:\selenium\tests\TestUserExtensions.html

The test fails on the line that uses "verifyValueRepeated"

Does anyone know why?

Regards,
Alan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1061&messageID=2973#2973

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error in Selenium sample tests

GW-5
I have narrowed the problem down to the last line in:
Selenium.prototype.assertValueRepeated = function(locator, text)

The line is:
this.assertMatches(expectedValue, actualValue);

By inserting "alert" statements, I have proved that expectedValue = actualValue

This means that the assertMatches is misbehaving.

Can anyone help?

Regards,
Alan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1061&messageID=2976#2976

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Error in Selenium sample tests

GW-5
hejdig.

assertMatches has changed.

It is now something like Assert.matches(

Selenium.prototype.assertTableRowsCount = function(locator, expectedText) {
    var element = this.page().findElement(locator);
    Assert.matches( expectedText, element.rows.length );
};

HTH

1) Is there a place to report this?  I checked through the issue tracker but found no way.  Maybe writing here is enough?

2) The sample file should be included in the automated tests.

3) The sample file should not be called sample but be included anyway.  No change of name should be neccessary.

/OF
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1061&messageID=3271#3271

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Error in Selenium sample tests

David Kemp

Ola <[hidden email]> wrote on 10/02/2006 04:32:33 AM:

> hejdig.
>
> assertMatches has changed.
>
> It is now something like Assert.matches(
>
> Selenium.prototype.assertTableRowsCount = function(locator, expectedText) {
>     var element = this.page().findElement(locator);  
>     Assert.matches( expectedText, element.rows.length );
> };
>
> HTH
>
> 1) Is there a place to report this?  I checked through the issue
> tracker but found no way.  Maybe writing here is enough?


I reported it (you should find that the latest out of SVN works):
http://jira.openqa.org/browse/SEL-132

By the way, you will probably find you need to create yourself an Open QA account before you can create new issues.

>
> 2) The sample file should be included in the automated tests.


Agreed.

>
> 3) The sample file should not be called sample but be included anyway.
> No change of name should be neccessary.
>


Good point.

Feel free to create a new issue with these suggestions.

Cheers,
David




David Kemp
ThoughtWorks Australia Pty Ltd
http://www.thoughtworks.com

Reply | Threaded
Open this post in threaded view
|

Re: Re: Error in Selenium sample tests

Mike Williams-7
In reply to this post by GW-5
Ola wrote:
>  3) The sample file should not be called sample but be included
>  anyway.  No change of name should be neccessary.

The sample was intentionally NOT called user-extensions.js; we thought
named it such might make it too easy to overwrite the users' extensions
during an upgrade install of Selenium.

--
cheers, MikeW                            http://www.dogbiscuit.org/mdub/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]