Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

body_text_unlike in T::S::R::D #180

Closed
glenwolf opened this issue Jan 23, 2015 · 9 comments
Closed

body_text_unlike in T::S::R::D #180

glenwolf opened this issue Jan 23, 2015 · 9 comments
Milestone

Comments

@glenwolf
Copy link

Calling any of the body_text_ tests (i.e. body_text_like, body_text_contains, etc.) from Test::Selenium::Remote::Driver performs the test as expected, but does not print the provided error message. However, if a body_text_ test fails, the output from the Test method is printed, implying that the body_text_ method is failing to forward the provided error message to the Test method that it calls.

EDIT:
example test:
$twd->body_text_unlike( qr/not viewable/, "Page or item is viewable to you" );

success yields ok 1
failure yields

not ok 1
#   Failed test at /Users/redshirt/some_test.t line 41.
#          got: "Beta\Topics\x{0a}\x{0a}\x{0a}\x{0a}"...
#       length: 10744
#     doesn't match '(?^:not viewable)'
@peroumal1
Copy link
Collaborator

Can you provide an example of a failing snippet of code please ?
I think I get it.
In any body_text_ functions, you have : my $desc = qq{Text contains "$str"} if ( not defined $desc ); which overwrites the my $desc = shift; at the beginning so it is likely that the message returned is not what you expect.
Can be easily fixed I guess.

@peroumal1
Copy link
Collaborator

@gempesaw do you mind if I integrate the fix for this on the branch from #179 ?

@gempesaw
Copy link
Collaborator

I think you actually already fixed that in #179. The my $desc in the two branches of that if were changed to just $desc. Or maybe I'm thinking of the wrong if branch. Either way, sure!

@gempesaw gempesaw added this to the 0.23 milestone Jan 23, 2015
@peroumal1
Copy link
Collaborator

Unlikely, what I fixed was for the content_ functions, I guess the
problem is still there for the functions mentionned.
Le 23 janv. 2015 17:52, "Daniel Gempesaw" notifications@github.com a
écrit :

I think you actually already fixed that in #179
#179. The my
$desc in the two branches of that if were changed to just $desc. Or maybe
I'm thinking of the wrong if branch. Either way, sure!


Reply to this email directly or view it on GitHub
#180 (comment)
.

@glenwolf
Copy link
Author

Man do I love responsive communities xD
You guys rock!

Now I just have to wait for cpan to update.

@gempesaw
Copy link
Collaborator

Hmm I've really got to figure out an automated way to update the windows mocks. Well, yeah, presuming all tests are passing this'll go out with 0.23, perhaps tonight or tomorrow. :D

@peroumal1
Copy link
Collaborator

Just thinking out loud, with a Browserstack or Saucelabs access, could we
possibly automate the generation of the mocks ?

On Fri, Jan 23, 2015 at 7:39 PM, Daniel Gempesaw notifications@github.com
wrote:

Hmm I've really got to figure out an automated way to update the windows
mocks. Well, yeah, presuming all tests are passing this'll go out with
0.23, perhaps tonight or tomorrow. :D


Reply to this email directly or view it on GitHub
#180 (comment)
.

Peroumalnaik Emmanuel

@glenwolf
Copy link
Author

Hey, that's great to hear! :D

On Fri, Jan 23, 2015 at 3:43 PM, peroumal1 notifications@github.com wrote:

Just thinking out loud, with a Browserstack or Saucelabs access, could we
possibly automate the generation of the mocks ?

On Fri, Jan 23, 2015 at 7:39 PM, Daniel Gempesaw notifications@github.com

wrote:

Hmm I've really got to figure out an automated way to update the windows
mocks. Well, yeah, presuming all tests are passing this'll go out with
0.23, perhaps tonight or tomorrow. :D


Reply to this email directly or view it on GitHub
<
https://github.com/gempesaw/Selenium-Remote-Driver/issues/180#issuecomment-71241824>

.

Peroumalnaik Emmanuel


Reply to this email directly or view it on GitHub
#180 (comment)
.

gempesaw added a commit that referenced this issue Jan 25, 2015
        [NEW FEATURES]
        - #178 Fix upload_file's return value & add test suite
        - #179 Add optional middle finder-strategy argument to T:S:R:D's find_element-like functions
        - #174 Add new endpoints: cache status, geolocation, log types, orientation, etc

        [BUG FIXES]
        - #175 Fix find_elements
        - #180 Stop overwriting body_text_unlike test descriptions
        - #141 Explicitly cast height and weight to integers for set_window_size
@gempesaw
Copy link
Collaborator

Thanks! Now on cpan as v0.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants