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

Add getParent() and hasClass(string $classname) to RemoteWebElement #440

Open
pkolenic opened this issue Apr 30, 2017 · 2 comments
Open
Labels
help wanted We'd appreciate help on this issue

Comments

@pkolenic
Copy link

Just a couple simple methods that would enhance the RemoteWebElement

public function getParent() 
{
   return $this->findElement(WebDriverBy::xpath('..'));
}

public function hasClass(string $className)
{
   $class = $this->getAttribute('class');
   if (!empty($class)) {
      return in_array($className, preg_split('/\s+/', $class));
   }
   return false;
}
@OndraM OndraM added the help wanted We'd appreciate help on this issue label Oct 16, 2017
@alekciy
Copy link
Contributor

alekciy commented Feb 12, 2023

Is this issue actual? Need help? This code view like simple and correct (I test it). I don't understand why it's not implemented.

@olleharstedt
Copy link

Bump for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We'd appreciate help on this issue
Projects
None yet
Development

No branches or pull requests

4 participants