private static void processDirective(WebDriver driver, Directive direc) throws InterruptedException {

        Thread.sleep(1000);
        if(direc instanceof HasElementDirective) {
            HasElementDirective directive = (HasElementDirective)direc;

            By byXPath = By.xpath(directive.getElementFinderXPath());
            WebElement e = (new WebDriverWait(driver, 5)).until(ExpectedConditions.elementToBeClickable(byXPath));

            System.out.println("TEXT: " + e.getText());
            System.out.println("Tag: " + e.getTagName());

            Locatable hoverItem = (Locatable) e;
            Mouse mouse = ((HasInputDevices) driver).getMouse();
            mouse.mouseMove(hoverItem.getCoordinates());

            if(directive instanceof ClickDirective){


                Thread.sleep(500);
                e.click();

            } else if (directive instanceof SendTextDirective){
                e.sendKeys(((SendTextDirective) directive).getPayload());
            }

        }else if(direc instanceof VerifyMessageDirective){
            WebElement e = null;
            try {

                String message = ((VerifyMessageDirective) direc).getMessageToFind();
                e = (new WebDriverWait(driver, 5)).until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[contains(., '" + message + "')]")));

            }finally{
                    assertNotNull(e);
            }
        }
    }