Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

fix(local): allow local driver provider to use gecko driver from config #4412

Merged
merged 1 commit into from
Jul 31, 2017

Conversation

cnishina
Copy link
Member

@cnishina cnishina commented Jul 29, 2017

  • Add gecko driver as configuration option to be used in the local
    driver provider.
  • Nit fixes to use string[] over Array in the configParser.ts.
  • Add functionality to addDefaultBinaryLocs_ to use the geckoDriver
    value set in the config or to check locally in the
    webdriver-manager/selenium folder.
  • Fix transpile errors in locator. Missing toString in ProtractorLocator
    interface.
  • Fix transpile errors in element. Cast wdpromise.Promise<{}> to
    wdpromise.Promise.
  • xit spec/basic/action_spec.js based on
    selenium-webdriver issue #3693.
    Added a // TODO comment to remove xit when selenium-webdriver resolves issue.

closes #4408 and closes #4411.

@heathkit
Copy link
Contributor

Circle fails clang-format. Do we need to update? Which version are you using?

@@ -55,9 +55,9 @@ export class ConfigParser {
* @return {Array} The resolved file paths.
*/
public static resolveFilePatterns(
patterns: Array<string>|string, opt_omitWarnings?: boolean,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

Copy link
Contributor

@heathkit heathkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix clang-format before merging, though.

@cnishina
Copy link
Member Author

cnishina commented Jul 30, 2017

Out of practice. I force pushed the branch but I forgot to stage my changes to the branch. 🤦‍♂️

@cnishina cnishina force-pushed the geckoFix branch 2 times, most recently from bec33ad to db0dd1b Compare July 30, 2017 18:24
@cnishina
Copy link
Member Author

Hmmm....

Failures:
1) using an ActionSequence should drag and drop
  Message:
    Expected '5' to equal '10'.
  Stack:
    Error: Failed expectation
        at UserContext.<anonymous> (/home/ubuntu/protractor/spec/basic/actions_spec.js:15:45)
        at /home/ubuntu/protractor/node_modules/jasminewd2/index.js:112:25
        at new ManagedPromise (/home/ubuntu/protractor/node_modules/selenium-webdriver/lib/promise.js:1067:7)
        at ControlFlow.promise (/home/ubuntu/protractor/node_modules/selenium-webdriver/lib/promise.js:2396:12)
        at schedulerExecute (/home/ubuntu/protractor/node_modules/jasminewd2/index.js:95:18)
        at TaskQueue.execute_ (/home/ubuntu/protractor/node_modules/selenium-webdriver/lib/promise.js:2970:14)
        at TaskQueue.executeNext_ (/home/ubuntu/protractor/node_modules/selenium-webdriver/lib/promise.js:2953:27)
        at asyncRun (/home/ubuntu/protractor/node_modules/selenium-webdriver/lib/promise.js:2860:25)
        at /home/ubuntu/protractor/node_modules/selenium-webdriver/lib/promise.js:676:7

... but '5' is equal to '10'! Pounds the square peg in the circular hole. Alright I'll go fix this too.

@wswebcreation
Copy link
Contributor

@cnishina

This is the circleCI issue @heathkit already raised

See the ticket, looks like an issue with Chromedriver not being able to interact in a good way with a HTML5 slider

@cnishina
Copy link
Member Author

cnishina commented Jul 31, 2017

Looks like it has something to do with: SeleniumHQ/selenium#3693

node_modules/selenium-webdriver/lib/http.js
post('/session/:sessionId/moveto')

@cnishina
Copy link
Member Author

Nope, directConnect with Firefox:

[17:51:33] I/launcher - Running 1 instances of WebDriver
[17:51:33] I/direct - Using FirefoxDriver directly...
[17:51:35] E/launcher - Unable to parse new session response: {"value": {"sessionId":"b90252dc-4ba0-f642-8c27-9cbb7fce6548","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"54.0.1","moz:accessibilityChecks":false,"moz:processID":11029,"moz:profile":"/var/folders/ft/1c7_rwcx16xcckqq1sl43b2m0000gn/T/rust_mozprofile.8OkiB8FXC1Sh","pageLoadStrategy":"normal","platformName":"darwin","platformVersion":"16.6.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
[17:51:35] E/launcher - WebDriverError: Unable to parse new session response: {"value": {"sessionId":"b90252dc-4ba0-f642-8c27-9cbb7fce6548","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"54.0.1","moz:accessibilityChecks":false,"moz:processID":11029,"moz:profile":"/var/folders/ft/1c7_rwcx16xcckqq1sl43b2m0000gn/T/rust_mozprofile.8OkiB8FXC1Sh","pageLoadStrategy":"normal","platformName":"darwin","platformVersion":"16.6.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
    at doSend.then.response (/Users/craignishina/src/protractor/node_modules/selenium-webdriver/lib/http.js:445:19)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/Users/craignishina/src/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
    at Function.createSession (/Users/craignishina/src/protractor/node_modules/selenium-webdriver/firefox/index.js:640:55)
    at Direct.getNewDriver (/Users/craignishina/src/protractor/built/driverProviders/direct.js:96:33)
    at Runner.createBrowser (/Users/craignishina/src/protractor/built/runner.js:195:43)
    at q.then.then (/Users/craignishina/src/protractor/built/runner.js:339:29)
    at _fulfilled (/Users/craignishina/src/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Users/craignishina/src/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/Users/craignishina/src/protractor/node_modules/q/q.js:796:13)
    at /Users/craignishina/src/protractor/node_modules/q/q.js:556:49
    at runSingle (/Users/craignishina/src/protractor/node_modules/q/q.js:137:13)

@cnishina
Copy link
Member Author

Also does not work with directConnect for Chrome. 👎

@cnishina
Copy link
Member Author

Does anyone have issues with me commenting out this test?

@cnishina
Copy link
Member Author

Per the issue above, we could wait for selenium-webdriver release or comment out the test and revisit it later.

@@ -13,6 +13,8 @@ exports.config = {

// Exclude patterns are relative to this directory.
exclude: [
// TODO(cnishina): update when mouseMoveTo works in the next release of selenium-webdriver.
'basic/action_spec.js',
Copy link
Contributor

@heathkit heathkit Jul 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this, could you change the test in action_spec.js to xit() and put the comment there? I think it'll be easier to keep track of that way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Somehow this does not work anyway. I'll move the // TODO comment

- Add gecko driver as configuration option to be used in the local
  driver provider.
- Nit fixes to use string[] over Array<string> in the configParser.ts.
- Add functionality to addDefaultBinaryLocs_ to use the geckoDriver
  value set in the config or to check locally in the
  webdriver-manager/selenium folder.
- Fix transpile errors in locator. Missing toString in ProtractorLocator
  interface.
- Fix transpile errors in element. Cast wdpromise.Promise<{}> to
  wdpromise.Promise<T>.
- xit spec/basic/action_spec.js based on
  [selenium-webdriver issue angular#3693](SeleniumHQ/selenium#3693).
  Added a // TODO comment to remove xit when selenium-webdriver resolves issue.

closes angular#4408 and closes angular#4411.
@cnishina cnishina merged commit 768fd39 into angular:master Jul 31, 2017
@wswebcreation
Copy link
Contributor

@cnishina

Just a question, but isn't it "dangerous" to merge this PR in the source saying it's fixed if there isn't a new release to npm for this?

Or will there be a release today?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants