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

Running unit tests and getting #608

Closed
2 tasks
MikeGitIt opened this issue Apr 6, 2017 · 11 comments
Closed
2 tasks

Running unit tests and getting #608

MikeGitIt opened this issue Apr 6, 2017 · 11 comments

Comments

@MikeGitIt
Copy link

In order to help us efficiently investigate your issue, please provide the following information:

Firefox Version

Firefox Developer Edition 54.0a2

Platform

Windows

Steps to reproduce -

This is being run from the unit test but all it is testing is whether or not an element is displayed and then entering a string of text, the username, into the field (How hard is that?). The chrome tests run just fine on the same page (hmmmmm):

  • System.InvalidOperationException : Expected [object Undefined] undefined to be a string (IndexOutOfBounds)
    at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
    at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
    at OpenQA.Selenium.Remote.RemoteWebElement.SendKeys(String text)
    at DPEXSelenium.Firefox_Tests.DpexLoginFirefox.ProcessLogin(String username, String password) in C:\MyProjects\Sandbox\DPEXSelenium\DPEXSelenium\Firefox Tests\DPEXLoginFirefox.cs:line 90
    at DPEX.Specs.DPEXLoginFirefoxSteps.GivenThePageHasLoadedInFirefox() in C:\MyProjects\Sandbox\DPEXSelenium\DPEX.Specs\Steps\DPEXLoginFirefoxSteps.cs:line 29
    at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
    at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
    at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance)
    at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()
    at DPEX.Specs.Features.DPEXLoginFirefoxFeature.ScenarioCleanup()
    at DPEX.Specs.Features.DPEXLoginFirefoxFeature.ICanLoginToThePortalSuccessfully() in C:\MyProjects\Sandbox\DPEXSelenium\DPEX.Specs\Features\DPEXLoginFirefox.feature:line 10

Given I have an open Firefox browser
-> done: DPEXLoginFirefoxSteps.GivenIHaveAnOpenBrowser() (8.8s)
And The page has loaded in Firefox
-> error: Expected [object Undefined] undefined to be a string (IndexOutOfBounds)
When I login to the site in Firefox
-> skipped because of previous errors
Then the result in FireFox should be true
-> skipped because of previous errors

  • HTML
    `
<div id="portalOneContainer"></div>

<div id="wrapper" class="container">
    <input id="ReturnPath" name="ReturnPath" value="/DEV_DAD_Renderer" type="hidden">
    <div id="renderbody" class="container">

Log In - Enter your user name and password below.

<script src="Dovetail%20Public%20Exchange_files/jquery_002.js"></script> <script src="Dovetail%20Public%20Exchange_files/jquery.htm"></script>
<div class="box1">
    <div style="font-size:100%;">

  1. User name

  2.                         <label>Password </label>&nbsp;
                            <input class="textbox" data-val="true" data-val-required="The Password field is required." id="pwdBox" name="Password" type="password">
                            <span class="field-validation-valid" data-valmsg-for="Password" data-valmsg-replace="true"></span>
                        </li>        
                    </ol>
                </fieldset>
    




  3. `
@andreastt
Copy link
Contributor

I can’t parse what this issue is about. Sorry.

@alvladimirov
Copy link

Having same problem with Firefox v53. Downgrading back to v52 solved the problem.
Gecko Driver version: v0.15.0

CODE that triggers this - a SendKeys() call:

[FindsBy(How = How.Id, Using = "Eligibility_DOBDay")] 
private IWebElement Eligibility_DoB_Day;
<....>
Eligibility_DoB_Day.SendKeys(p.ToString());

ELEMENT I'm trying to interact with:
<input class="xxshort numeric_dayofmonth" data-val="true" data-val-number="The field DOBDay must be a number." id="Eligibility_DOBDay" maxlength="2" name="Eligibility.DOBDay" pattern="[0-9]*" value="" autocomplete="off" type="text">

EXCEPTION:
Execute
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Expected [object Undefined] undefined to be a string (IndexOutOfBounds)
HResult: -2146233079
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.SendKeys(String text)
--- End of inner exception stack trace ---

@andreastt
Copy link
Contributor

If this is about send keys not working (I can’t really guess without a trace-level log!), then it is broken with the latest Firefox Nightly and geckodriver 0.15.0. Upgrading to 0.16.0 when it comes out should solve any incompatibilities between Nightly and geckodriver.

I don’t know what the issue is about Firefox 53 though.

@MatejQ
Copy link

MatejQ commented Apr 20, 2017

Just got the same issue after freshly upgrading Firefox to version 53. On version 52, tests were running fine. The error seems to be triggered by SendKeys() call in Selenium, which is necessary to pass the login page.

@kaspmode
Copy link

Me to same issue SendKeys() generates error, besides go back to the older version does anybody has a solution? :(

@andreastt
Copy link
Contributor

The send keys problems have already been reported in #659, and been fixed.

@whimboo
Copy link
Collaborator

whimboo commented Apr 20, 2017

Well, we should note that geckodriver 0.16 would be required which hasn't been released yet.

@whimboo
Copy link
Collaborator

whimboo commented Apr 27, 2017

Can someone please verify with https://github.com/mozilla/geckodriver/releases/tag/v0.16.1? Thanks.

@alvladimirov
Copy link

Works perfectly fine for me.
GeckoDriver : 0.16.1 (32bit)
Selenium: 3.4.0
Firefox: v53

I checked with exactly the same code that used to fail on SendKeys ().
Thank you for the prompt fix!

@adeelilyas
Copy link

Just update GeckoDriver to the latest with Firefox v53 and it will work. Download the one you required from here.

@lock
Copy link

lock bot commented Aug 17, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

@lock lock bot locked and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants