Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140705

Selenium Javascript - How to find grandparent and parent

$
0
0

So I have been trying to challange myself and I have been trying to solve grandparent and parent from using <i class="test-object"></i> with using the code below

<button do-something="" primary-button="" class="gfjhghjfghjfgfh"  disabled="">
<span class="primary-button-wrapper">
  <i class="test-object"></i>
  <span>Nice</span>
</span>

Basically what I am trying to be able to do is to find the grapndparent and parent (button and span) using javascript selenium.

So for I have only achieved:

 const testing= await driver.findElement(webdriver.By.className('create-project'));
 console.log(await testing.getAttribute('class')); 

Viewing all articles
Browse latest Browse all 140705

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>