Below is my json file

{

"orgName": "CTS", "stateId": "Dubai"

}

but drop down field is not taking the value "Dubai" from json.. Please someone solve this

String org = (String) organization.get("orgName");
        String dd = (String) organization.get("stateId");
                                    
        WebElement orgN = dr.findElement(By.xpath("//input[@id='orgName']"));
        orgN.sendKeys(org);
        Thread.sleep(2000);
        
        WebElement drop = dr.findElement(By.xpath("//div[@class=' css-14cdt5o-control']"));
        Select dropdown = new Select(drop);
        dropdown.selectByVisibleText(dd);

enter image description here

0

There are 0 best solutions below