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

Provide partial named selector that selects also the hidden fields #711

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

claudiu-cristea
Copy link

@claudiu-cristea claudiu-cristea commented Jul 17, 2016

Sometime we have to search for hidden fields (<input type="hidden" .../>). Add this selector to be used for such cases.

{
public function __construct()
{
$this->registerReplacement('%notFieldTypeFilter%', "not(%buttonTypeFilter%)");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name doesn't really say that hidden fields are allowed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartialNamedIncludingHiddenFieldsSelector would be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I've meant notFieldTypeFilter and buttonTypeFilter doesn't mention hidden fields in any way.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I cannot rename that because, in fact, I'm overriding there the existing %notFieldTypeFilter% replacement.

@aik099
Copy link
Member

aik099 commented Jul 18, 2016

@stof , what do you think about this PR? Searching for hidden fields doesn't look like something, that will fit into Mink purpose.

@claudiu-cristea
Copy link
Author

I think we should even consider this as the default behaviour for "named_partial". I can provide a PR if you agree.

@dawehner
Copy link
Contributor

A hidden field makes sense when you use a JS based driver, for example with https://github.com/jcalderonzumba/MinkPhantomJSDriver but I agree, per default, a browser user doesn't have the capability directly to do that.

On the other hand, making it possible to test security related stuff, by also changing the hidden fields, could be made as a point.

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

Successfully merging this pull request may close these issues.

None yet

3 participants