'Hi All . Help me get value from the table , Using cucmber test cases . I am getting error .get using AsMap

enter image description here@And("Click Test Box and Verify") public void Click_Test_Box_and_Verify(DataTable ClickTestBoxandVerify ) throws Throwable { Thread.sleep(3000); driver.findElement(By.xpath("//*[@id="item-0"]/span")).click();

    // " Test Box and Verify":// Test Field 
    
    Map<String, String> ClickTestBoxandVerifyList = ClickTestBoxandVerify.asMap(String.class, String.class);
    
    
    // "Full Name":// Test Field 
    element = driver.findElement(By.xpath("//*[@id=\"userName\"]"));
    element.clear();
    element.sendKeys(ClickTestBoxandVerify.get);
            
    

}enter image description here


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source