How to click on the psuedo element that has a pop up checkbox element in selenium?

60 Views Asked by At

I am trying to automate test script and ran upon the pseudo element which seems to not clickable using normal element finders. The element to be clicked is a field after which the checkbox pop which is to be clicked again.

<span class="mat-select-placeholder mat-select-min-line ng-tns-c156-64 ng-star-inserted">
:before==$0
</span>

enter image description here

I have tried to click it using Actions method and JavascriptExecutor but was not able to. Please help.

This is the codes that I have tried.

driver.findElement(By.xpath("//span[@class='mat-select-placeholder mat-select-min-line ng-tns-c211-60 ng-star-inserted']").click();
0

There are 0 best solutions below