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

DOM is undefined when a session is created without a url parameter #36

Closed
poftadeh opened this issue Aug 27, 2019 · 0 comments · Fixed by #38
Closed

DOM is undefined when a session is created without a url parameter #36

poftadeh opened this issue Aug 27, 2019 · 0 comments · Fixed by #38
Assignees
Labels
Priority: Critical Type: Bug Something isn't working
Projects

Comments

@poftadeh
Copy link
Contributor

poftadeh commented Aug 27, 2019

Describe the bug
If no url is provided when creating a session, the dom object within a Browser class does not get initialized.

To Reproduce
POST to /session/ with the following capabilities:

{    
	"capabilities": {
      "firstMatch": [
        {
          "browserName": "pluma",
          "plm:plumaOptions": { "runScripts": false }
        }
      ]
    }
}

Describe the results you received:
this.dom is undefined.

Describe the results you expected:
this.dom to be set to a default jsdom object.

Additional context
Suspected cause is in Browser.ts:

      this.dom = await new JSDOM(' ', {
        resources: config.resourceLoader,
        runScripts: config.runScripts,
        beforeParse: config.beforeParse,
        pretendToBeVisual: true,
        cookieJar: config.jar
      });

await on a non-promise may be preventing the value from being set.

@poftadeh poftadeh added the Type: Bug Something isn't working label Aug 27, 2019
@poftadeh poftadeh self-assigned this Aug 27, 2019
@poftadeh poftadeh added this to To do in Kanban via automation Aug 27, 2019
Kanban automation moved this from To do to Done Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Critical Type: Bug Something isn't working
Projects
Kanban
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant