MuraliKola / robotframework-seleniumlibrary

Automatically exported from code.google.com/p/robotframework-seleniumlibrary
Apache License 2.0
1 stars 0 forks source link

functions in _element.py should check before prefixing "xpath=" to passed in xpath arguments #247

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
VERSION = '1.0.1'

There are two functions in keywords\_element.py 

get_matching_xpath_count()
xpath_should_match_x_times()

that I guess exclusively take xpath when compared to other functions.

I guess it is ok for these functions to assume that only xpath will be passed 
in. 

But they do a weird thing by prefixing "xpath=" to the passed in argument 
without checking if the argument already has "xpath=".

This results in error in cases like mine, where I am reusing locators that have 
been defined with "xpath=" and used elsewhere in the project with other 
Selenium2Library functions.

I guess doing the check before prefixing will be a minor thing to add. Let me 
know if it makes sense and I can do it.

Original issue reported on code.google.com by mohanraj...@gmail.com on 2 Aug 2012 at 9:15

GoogleCodeExporter commented 8 years ago
This seems reasonable. If you provide a patch, I can incorporate it.

Original comment by janne.t....@gmail.com on 6 Aug 2012 at 7:55

GoogleCodeExporter commented 8 years ago
After looking at the issue closer, it seems that you actually use 
selenium2library. IT has its own issue tracker, 
https://github.com/rtomac/robotframework-selenium2library. Please report this 
issue there, if it is still valid.

Original comment by janne.t....@gmail.com on 27 Aug 2012 at 1:00

GoogleCodeExporter commented 8 years ago
This is actually also problem in SeleniumLibrary and despite #2, I am going to 
fix this here also.

Original comment by janne.t....@gmail.com on 27 Aug 2012 at 1:00

GoogleCodeExporter commented 8 years ago
And, after reviewing the code, we do no such thing, so closing this as invalid,

Original comment by janne.t....@gmail.com on 27 Aug 2012 at 1:02