Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to test autocomplete #371

Open
wrossier opened this issue Feb 25, 2016 · 2 comments
Open

How to test autocomplete #371

wrossier opened this issue Feb 25, 2016 · 2 comments

Comments

@wrossier
Copy link

Hi,

I'd like to make a test with an autocomplete (Jquery, https://jqueryui.com/autocomplete/) field, I can't access the hidden field attached to it.

I searched on Google, without success :(

Do you have any examples for testing that ?

Below, our test code:
`
function testTest(){
$this->url("/");
$input = $this->byLinkText("Développement / programmation");
$input->click();

    $input = $this->byId("js_header_autocomplete_activity");
    $input->clear();
    $input->value("Développement / programmation");

}

`

Regards,
William

@wrossier
Copy link
Author

I found the problem, my code doesn't work on Firefox but on chrome, below ma configuration:

public static $browsers = array(
// run FF15 on Windows 8 on Sauce
// array(
// 'browserName' => 'firefox',
// 'desiredCapabilities' => array(
// 'version' => '44',
// 'platform' => 'Windows 2012',
// )
// ),
// run Chrome on Linux on Sauce
array(
'browserName' => 'chrome',
'desiredCapabilities' => array(
'platform' => 'Windows 2012'
)
),
);

When I use the comment configuration (with firefox) it doesn't work and with the other configuration it's ok.

I don't know why ?
weird

William

@giorgiosironi
Copy link
Owner

The mantra of Selenium is to represent what a real user does, so afaik hidden fields and in general invisible elements must not be interacted with.

Moreover, differences between browsers are out of the scope of this project, since we pass commands to the Selenium server in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants