/**
     * Goes to SQL tab, executes queries, returns to tracking page
     *
     * @return void
     */
    private function _executeSqlAndReturnToTableTracking()
    {
        $this->byLinkText("SQL")->click();
        $this->_helper->waitForElement("byId", "queryfieldscontainer");
        $this->_helper->typeInTextArea(
            ";UPDATE test_table SET val = val + 1; "
            . "DELETE FROM test_table WHERE val = 3"
        );
        $this->byCssSelector("input[value='Go']")->click();
        $this->_helper->waitForElement("byClassName", "success");

        $ele = $this->byLinkText("More");
        $this->moveto($ele);
        $this->byLinkText("Tracking")->click();
        $this->_helper->waitForElement("byId", "versions");
    }
    /**
     * Function that goes to the import page, uploads a file and submit form
     *
     * @param string $type   level: server, db or import
     * @param string $plugin format: csv, json, etc
     *
     * @return string export string
     */
    private function _doExport($type, $plugin)
    {
        $this->byLinkText("Export")->click();

        $this->_helper->waitForElement("byName", "dump");
        $this->byCssSelector("label[for=radio_custom_export]")->click();

        if ($type == 'server') {
            $this->byLinkText('Unselect All')->click();
            $this->byCssSelector("option[value=" . $this->_dbname . "]")->click();
        }

        if ($type == 'table') {
            $this->byCssSelector("label[for=radio_allrows_0]")->click();
            $this->byName("limit_to")->clear();
            $this->byName("limit_to")->value("1");
        }

        $this->select($this->byId("plugins"))->selectOptionByLabel($plugin);
        $this->byCssSelector("label[for=radio_view_as_text]")->click();

        if ($plugin == "SQL") {
            $this->byCssSelector(
                "label[for=radio_sql_structure_or_data_structure_and_data]"
            )->click();

            if ($type != "table") {
                $this->byCssSelector(
                    "label[for=checkbox_sql_create_database]"
                )->click();
            }
        }

        $this->byId("buttonGo")->click();

        $text = $this->_helper->waitForElement("byId", "textSQLDUMP")->text();

        return $text;
    }