Hey, QA! I’ve been at this for hours and cannot resolve.

I’m actively trying variations of something like this:

function closeModal() {
driver.switchTo().activeElement()
driver.findElement(locators.closeModal).click()
}

It hits on the class name, so I know my target is correct. The relevant parts of the HTML looks like this:
<div class="modal fade slide-up disable-scroll in" id="propertySearchModal" tabindex="-1" role="dialog" aria-hidden="false" style="display: block;">

<div class="modal-dialog hidden-print">

<div class="modal-content-wrapper">

<div class="modal-content">

<div class="modal-header clearfix text-left">

<button type="button" class="" data-dismiss="modal" aria-label=""><span aria-hidden="true">×</span></button>

<h3>Search for Address</h3>

</div>

Any help would be greatly appreciated – more than wanting this to work, I want to know what I am doing wrong.



Source link https://www.reddit.com/r//comments/8t3zfs/__how_in_the__can_i_close/

LEAVE A REPLY

Please enter your comment!
Please enter your name here