Support application name capability #45

Closed
wants to merge 5 commits into
from

3 participants

@freddyvega

This capability has been asked for on the Google Selenium-Users and Webdriver groups on numerous occasions.

@markstos
Collaborator

@freddyvega, you said this feature has been asked for many times. Could you link to some of those discussions so they could be reviewed. I also see you've added some commits. Are your proposed changes ready to be merged?

@freddyvega
@markstos
Collaborator

Thanks for the reply @freddyvega. I just meant to ask if you considered it "done", or if there were more refinements to you added first. I'm not currently an official maintainer, but I may become one. It can be still be useful to have peers review pull requests and recommend them for merging if they can't do it themselves.

@freddyvega

@markstos, yes, I do consider it done. It has not been reviewed by anyone though. I have tested it extensively (in my own implementation) and have not had any issue to date.

@markstos
Collaborator

@freddyvega, I've taken initial look at this now, by appending ".diff" to the URL: https://github.com/aivaturi/Selenium-Remote-Driver/pull/45.diff.

The new feature will need documentation, and tests if applicable.

@freddyvega

@markstos, will do. I'll add relevant pod as well as tests this weekend.

@gempesaw
Owner

Hey, @freddyvega are you still interested in this?

I'm reluctant to merge it for two reasons:

  • the code is obsolete in light of #103, which is I'm currently working on getting merged in the dev branch
  • The distinction between whats in extra_capabilities vs a key in the constructor hash proper seems to be causing more confusion and problems than its worth? None of the other bindings have this distinction, which makes working with S::R::D more complicated than it needs to be. I'm in favor of doing away with it entirely, which would address this issue. But, that's probably a whiles away from now...
@freddyvega

@gempesaw I understand your rationale. And I'm ok with it. It appears that I would be able to accomplish the same goal after #110 , is this a correct assessment?

And you are correct in that no other binding allows you to target a specific platform/browser/OS combination when using grid. It's basically up to the grid to choose for you what it thinks the best one is. To me, and for the project I was working on, this was not desirable behavior.

@gempesaw gempesaw added this to the 0.20 milestone Apr 25, 2014
@gempesaw
Owner

resolved in v0.20 with the new_from_caps sub:

my $driver = Selenium::Remote::Driver->new_from_caps(
    desired_capabilities => { application_name => 'appName' }
);

That'll generate a POST to localhost:4444/wd/hub/session with the exact payload of {"desiredCapabilities": {"application_name" => "appName"}} or so - guessing on the json, but the point is that nothing else will be packed up into the $caps. There's a few more examples in #110 and in the POD on metacpan. HTH!

@gempesaw gempesaw closed this Apr 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment