public/phpmyadmin/test/selenium/ExportTest.php
/**
     * 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
     */
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
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->expandMore();
        $this->waitForElement('byPartialLinkText', "Export")->click();
        $this->waitAjax();
        $this->waitForElement("byId", "quick_or_custom");
        $this->byCssSelector("label[for=radio_custom_export]")->click();
        $this->select($this->byId("plugins"))->selectOptionByLabel($plugin);
        if ($type === 'server') {
            $this->scrollIntoView('databases_and_tables', 200);
            $this->byPartialLinkText('Unselect all')->click();
            $this->byCssSelector("option[value=" . $this->database_name . "]")->click();
        }
        if ($type === 'table') {
            $this->scrollIntoView('radio_allrows_0');
            $this->byCssSelector("label[for=radio_allrows_0]")->click();
            $this->byName("limit_to")->clear();
            $this->byName("limit_to")->value("1");
        }
        $this->scrollIntoView('radio_view_as_text');
        $this->byCssSelector("label[for=radio_view_as_text]")->click();
        if ($plugin == "SQL") {
            if ($type !== 'db') {
                $this->scrollIntoView('radio_sql_structure_or_data_structure_and_data');
                $this->byCssSelector("label[for=radio_sql_structure_or_data_structure_and_data]")->click();
            }
            $this->scrollIntoView('checkbox_sql_if_not_exists');
            $ele = $this->byId('checkbox_sql_if_not_exists');
            if (! $ele->selected()) {
                $this->byCssSelector("label[for=checkbox_sql_if_not_exists]")->click();
            }
        }
        $this->scrollToBottom();
        $this->byId("buttonGo")->click();
        $this->waitAjax();
        $text = $this->waitForElement("byId", "textSQLDUMP")->text();
        return $text;
    }
private function _doExport ( $ type , $ plugin ) { $ this -> expandMore ( ) ; $ this -> waitForElement ( 'byPartialLinkText' , " Export " ) -> click ( ) ; $ this -> waitAjax ( ) ; $ this -> waitForElement ( " byId " , " quick_or_custom " ) ; $ this -> byCssSelector ( " label[for=radio_custom_export] " ) -> click ( ) ; $ this -> select ( $ this -> byId ( " plugins " ) ) -> selectOptionByLabel ( $ plugin ) ; if ( $ type === 'server' ) { $ this -> scrollIntoView ( 'databases_and_tables' , 200 ) ; $ this -> byPartialLinkText ( 'Unselect all' ) -> click ( ) ; $ this -> byCssSelector ( " option[value= " . $ this -> database_name . " ] " ) -> click ( ) ; } if ( $ type === 'table' ) { $ this -> scrollIntoView ( 'radio_allrows_0' ) ; $ this -> byCssSelector ( " label[for=radio_allrows_0] " ) -> click ( ) ; $ this -> byName ( " limit_to " ) -> clear ( ) ; $ this -> byName ( " limit_to " ) -> value ( " 1 " ) ; } $ this -> scrollIntoView ( 'radio_view_as_text' ) ; $ this -> byCssSelector ( " label[for=radio_view_as_text] " ) -> click ( ) ; if ( $ plugin == " SQL " ) { if ( $ type !== 'db' ) { $ this -> scrollIntoView ( 'radio_sql_structure_or_data_structure_and_data' ) ; $ this -> byCssSelector ( " label[for=radio_sql_structure_or_data_structure_and_data] " ) -> click ( ) ; } $ this -> scrollIntoView ( 'checkbox_sql_if_not_exists' ) ; $ ele = $ this -> byId ( 'checkbox_sql_if_not_exists' ) ; if ( ! $ ele -> selected ( ) ) { $ this -> byCssSelector ( " label[for=checkbox_sql_if_not_exists] " ) -> click ( ) ; } } $ this -> scrollToBottom ( ) ; $ this -> byId ( " buttonGo " ) -> click ( ) ; $ this -> waitAjax ( ) ; $ text = $ this -> waitForElement ( " byId " , " textSQLDUMP " ) -> text ( ) ; return $ text ; }
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
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