Facing an issue with a new function creation as I'm unable to utilize a driver within it
An error message saying "The local variable driver may not have been initialized" is being displayed
No trouble using the driver in the main section though
{
WebDriver driver;
WebElement check = driver.findElement(By.id("conditions_agree"));
boolean selected_value = check.isSelected();
if(!selected_value) {
check.click();
}
}