Skip to content

Element visibility is not triggered by hovering another element #477

@HPetra

Description

@HPetra

What are you trying to achieve? (Expected behavior)

Trigger an appearance of an element, by hovering an another element on it.

What do you get instead? (Actual behavior)

PHP Fatal error: Uncaught exception 'Facebook\WebDriver\Exception\NoSuchElementException' with message 'no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@Style,'background-color: darkgreen')]"}

How could the issue be reproduced? (Steps to reproduce)

$capabilities = DesiredCapabilities::htmlUnitWithJS();
    {
        // For Chrome
        $options = new ChromeOptions();
        $prefs = array('download.default_directory' => '/tmp');
        $options->setExperimentalOption('prefs', $prefs);
        $capabilities = DesiredCapabilities::chrome();
        $capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
    }
$driver = RemoteWebDriver::create($host, $capabilities, 5000);

$driver->get('http://react-dnd.github.io/react-dnd/examples-dustbin-multiple-targets.html');
$driver->navigate()->to('http://react-dnd.github.io/react-dnd/examples-dustbin-multiple-targets.html');

$dragBox = $driver->findElement(WebDriverby::xpath("//div[@data-reactid='105']"));

$dropBox = $driver->findElement(WebDriverBy::xpath("//div[@data-reactid='96']"));
$driver->action()
    ->clickAndHold($dragBox)
    ->moveToElement($dropBox)
    ->perform();

$driver->wait(15, 1000)->until(
    WebDriverExpectedCondition::presenceOfElementLocated(WebDriverBy::xpath("//div[contains(@style,'background-color: darkgreen')]"))
);

$driver->action()
    ->release($dropBox)
    ->perform();

Details

  • PHPUnit: 5.0.9
  • ChromeDriver: 2.32.498537
  • PHP version: 5.6.29
  • Operating system: MacOS
  • Browser used + version: Chrome, 60.0.3112.113

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedWe'd appreciate help on this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions