I have the text New Delhi under h2 in the HTML.
<div class="col-md-12 col-sm-12 col-xs-12 no-boot-pad">
<h2 class="head-travel-city">Abu Dhabi to New Delhi</h2>
</div>
The querySelector for above h2 is below. I want to run a condition, if the following querySelector has the text New Delhi in it,
document.querySelector("#flight-details-container > div:nth-child(1) >
div.row.no-boot-md-mar > div > h2")
Then hide the following querySelector container.
document.querySelector("body > div:nth-child(32) >
div.fade.ssh-modal.ssr-modal.in.modal > div > div > div.modal-body >
form > div.pax-row.adult > div:nth-child(3) > div")