Need better Element description when passing element instead of ID

Bug #1005972 reported by Mark Kennedy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
selenium-simple-test
Fix Released
Undecided
Corey Goldberg

Bug Description

For methods that accept id_or_elem, the description that is generated when passing a WebElement is the default description returned by that class, which isn't a great format. For example, this:

"Writing to textfield <selenium.webdriver.remote.webelement.WebElement object at 0x02ACD9B0> with text 'Hello, World!'"

It would be nice to generate a more useful description if the argument is a WebElement. For example, you could inspect the element to see if it has an ID or a name, and if so use that in the description, e.g.:

"Writing to textfield identified as 'foobar' with text 'Hello, World!'"

or

"Writing to textfield named 'foobar' with text 'Hello, World!'"

MK

Related branches

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

I just fixed this up. will land to trunk after review.

-Corey

Changed in selenium-simple-test:
assignee: nobody → Corey Goldberg (coreygoldberg)
status: New → In Progress
status: In Progress → Fix Committed
Revision history for this message
Mark Kennedy (mkennedy-u) wrote : RE: [Bug 1005972] Re: Need better Element description when passing element instead of ID

Nice, glad to hear it! Thanks!

MK

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

this just landed in trunk and is available:
lp:selenium-simple-test

I'll mark the bug as released next time we upload to PyPI.

-Corey

Vincent Ladeuil (vila)
Changed in selenium-simple-test:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.