I have a scenario on my website where I have two separate div elements:
<div class="wg-block" data-reactid="10"
<div class="wg-header" data-reactid="11"/div>
....
<h4 class='condition'> "Text" </h4>
<div class="wg-footer" data-reactid="12"/div>
....
<div class="click"> </div>
My goal is to click on an element in the second div based on a condition present in the first div.
What would be the correct method to achieve this?