I want to click on the find button to get address list for that I have used className
to find element but it is not working.
Code I have written.
driver.findElement(By.className("secondary right postfix findaddress")).click();
I have also tried using below code but it is not working. I am getting Timed out after 20 seconds waiting for presence of element located by: By.className: secondary right postfix findaddress
WebDriverWait wait4 = new WebDriverWait(driver,20);
WebElement radio4 = wait4.until(ExpectedConditions.presenceOfElementLocated(By.className("secondary right postfix findaddress")));
((JavascriptExecutor)driver).executeScript("arguments[0].click()", radio4);
HTML code
<div class="small-3 columns">
<button class="secondary right postfix findaddress" style="border-left-color: currentColor !important; border-left-width: medium !important; border-left-style: none !important;" onclick="cmss.addressLookup.search($(this).closest('div.addressSearch'))" type="button">Find</button>
</div>
Once find button clicked select address from dropdown list.
<select class="AddressList" id="CurrentCriteria__addressLst">
<option>- Select -</option><option id="0" name="0"> I can't see my address </option>
<option id="1" name="1"> 2 Abbot Gardens Essex IG5 7BB</option>
<option id="2" name="2"> 3 Abbot Gardens Essex IG5 7BB </option>
Can anyone help me?