joomla-projects / joomla-browser

An extended Webdriver Browser to navigate through Joomla sites with Codeception
GNU General Public License v2.0
19 stars 35 forks source link

Error with UninstallExtension #119

Closed PetarT closed 7 years ago

PetarT commented 8 years ago

Heya all folks! Would like to report an issue with latest joomla-browser function uninstallExtension there. More info can be found in log and uninstall file I provided: uninstall.txt ZZUninstallExtensionCept.txt

Error:

1) ZZUninstallExtensionCept: Uninstall reditem extensions Test tests/acceptance/uninstall/ZZUninstallExtensionCept.php

[Facebook\WebDriver\Exception\UnknownServerException] Element is not clickable at point (429.76666259765625, 255). Other element would receive the click:

Command duration or timeout: 80 milliseconds Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' System info: host: 'testing-gce-c74846d9-87db-49cc-a1e5-80c374d136ed', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-92-generic', java.version: '1.7.0_80' Session ID: e2e1b980-839d-43c8-97cb-73ffe614ec69 Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, nativeEvents=false, webStorageEnabled=true, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=38.4.0}]

PetarT commented 8 years ago

My temp solution for this one is:

<?php
/**
 * @package     RedITEM
 * @subpackage  Cept
 * @copyright   Copyright (C) 2008 - 2015 redCOMPONENT.com. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
/* Name of the File is Kept as ZZUninstallExtension instead of UninstallExtension
   So that this tests is loaded at the last during the test execution */

// Load the Step Object Page
$I = new AcceptanceTester($scenario);

$I->wantTo('Uninstall redITEM Extensions');
$I->doAdministratorLogin();
$I->amOnPage('/administrator/index.php?option=com_installer&view=manage');
$I->click("//button[@class='btn hasTooltip js-stools-btn-filter']");
$I->selectOptionInChosen('#filter_type', 'Component');
$I->fillField('#filter_search', 'redITEM');
$I->pressKey(['id' => 'filter_search'], WebDriverKeys::ENTER);
$I->waitForElement('#manageList');
$I->click("//input[@id='cb0']");
$I->click("Uninstall");
$I->acceptPopup();
$I->see('Uninstalling the component was successful', '#system-message-container');
$I->fillField('#filter_search', 'redITEM');
$I->pressKey(['id' => 'filter_search'], WebDriverKeys::ENTER);
$I->waitForText('There are no extensions installed matching your query.', 10, '.alert-no-items');
$I->see('There are no extensions installed matching your query.', '.alert-no-items');
$I->selectOptionInChosen('#filter_type', '- Select Type -');

Hope this one can help you out for solving issue :)

yvesh commented 8 years ago

Hi Petar! Can you do a pull request with your changes? Thank you! Yves

astridx commented 7 years ago

I had no problems with the develop version. But I could not get the PR to run without failure. I am new. Perhaps I made a mistake. That is why I explain what I did:

1. I'm updating my project

1. Question: I see the message “Joomla! 3.6.3 is available: “ in the head, also the version in the foot is up to date? Do I work with the correct version?

2. I create a new branch

_2. Question: Is Joomla-Browser in the GSCO16 Project not the current version or did I made an mistake? _

3. I fetched the current joomla-browser-version from github

class InstallAdventComponentCest
{
    public function installAdventComponent(\AcceptanceTester $I)
    {
        $I->am('Administrator');
        $I->doAdministratorLogin();
        $I->installExtensionFromFolder('/var/www/html/gsoc16_browser-automated-tests/tmp/adventskalender-master', 'Component');
    }
    public function uninstallAdventComponent(\AcceptanceTester $I)
    {
        $I->am('Administrator');
        $I->doAdministratorLogin();
        //$I->uninstallExtension('com_advent ', 'Component');
        $I->uninstallExtension('com_advent ');
    }
}
  1. I made the test ./tests/codeception/vendor/bin/robo run:test -> selecting my options and I had no problem. See attached message.

1.txt

7. I applied the patch

@Petar I am really new. Perhaps I do not see your real problem. But could you please explain me, what problem you exactly want to solve with this PR? First I get this error: [Error] Call to undefined method Codeception\Module\JoomlaBrowser::wantTo() Where do I find the method wantTo()

1.txt 2.txt 3.txt

PetarT commented 7 years ago

@astridx checkout my PR there https://github.com/joomla-projects/joomla-browser/pull/120/files for more info. You will see what changes I mention.

puneet0191 commented 7 years ago

@PetarT Are you still facing this issue? I think in the latest version we have addressed this.

yvesh commented 7 years ago

Closing for now.. If you still have issues feel free to reopen it any time.