put method contents into private method with WebElement parameter