vendredi 24 juillet 2020

Cannot click on checkbox using selenium in java

I am trying to filter out names of books in Amazon, so after I navigated successfully and after I serached for my desired book I tried to filter out all the books that are in english on the side filter panel: enter image description here

When I am trying in my code to click on the 'English' languge checkbox, it does click on something but the checkbox not being checked as expected, this is the html: enter image description here

and this is my code:

        List<WebElement> list = driverWrapper.findElements(By.cssSelector("ul[aria-labelledby='p_n_feature_nine_browse-bin-title'] li"));
        for(WebElement elem: list){
            if(elem.getText().equals(LangugaeFilterOptions.ENGLISH.getValue())){
                elem.click();
            }
        }



Aucun commentaire:

Enregistrer un commentaire