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

Getting error - HTML Page #1

Open
qburst-hari opened this issue Apr 3, 2020 · 13 comments
Open

Getting error - HTML Page #1

qburst-hari opened this issue Apr 3, 2020 · 13 comments

Comments

@qburst-hari
Copy link

qburst-hari commented Apr 3, 2020

<script src="/assets/jquery-3.1.1.min.js" type="text/javascript"></script> <script src="/assets/displayhelpservlet.js" type="text/javascript"></script> <script type="text/javascript"> var json = Object.freeze('{"consoleLink": "\u002fwd\u002fhub","type": "Standalone","class": "org.openqa.grid.web.servlet.DisplayHelpHandler$DisplayHelpServletConfig","version": "3.141.59"}'); </script>

Selenium  v.

Whoops! The URL specified routes to this help page.

For more information about Selenium please see the docs and/or visit the wiki. Or perhaps you are looking for the Selenium console.

Happy Testing!

Selenium is made possible through the efforts of our open source community, contributions from these people, and our sponsors.
@qburst-hari qburst-hari changed the title Getting error - HarRecorder is not defined Getting error - HTML Page Apr 3, 2020
@idoco
Copy link
Contributor

idoco commented Apr 3, 2020

Hi @qburst-hari can you share some additional information about this issue? (Maybe a code example?)
When you run this Selenium test without the har-recorder does it successfully load this HTML page?

@qburst-hari
Copy link
Author

Yes, I am using webdriverio selenium for automation. so since by default chrome driver listens to port 4444. I changed the debugging port also to port 4444. When I run the selenium test without har-recorder, my automation page loads. But when I add har recorder. It loads this selenium page.

@idoco
Copy link
Contributor

idoco commented Apr 3, 2020

Interesting. Can you try to clone and run this example project and let me know if it works for you?

I'm trying to understand if this is a system configuration issue or a problem in the way the recorder is used in your code.

@qburst-hari
Copy link
Author

Sure, let me check and update you

@qburst-hari
Copy link
Author

Thats working for me. There are some errors, but the har file is generated. for me the problem is. I am starting my selenium standalone in port 4444. so for the chrome debug mode, If I add any other port - I will get error - connect ECONNREFUSED 127.0.0.1:9223

If I add 4444. I am getting that html page which I dont have any clue what it does.

@qburst-hari
Copy link
Author

My chrome configuration is like below :

  browserName: "chrome",
  applicationName: "common",
  "goog:chromeOptions": {
    mobileEmulation: { deviceName: "Pixel 2" },
    w3c: false,
    args: [
      "--remote-debugging-port=9223",
      "--reduce-security-for-testing",
      "--use-mobile-user-agent",
      "--user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/79.0.3945.73 Mobile/15E148 Safari/605.1",
      "--window-size=0,870"
    ]
  }

@qburst-hari
Copy link
Author

var HarRecorder = require("har-recorder")
const { startRecording, endRecording } = HarRecorder();

onPrepare: function() {
return startRecording({ port: 9223 })
},

onComplete: function() {
return endRecording('ABBA.har');
},

I have used it with hooks of webdriverio

@idoco
Copy link
Contributor

idoco commented Apr 3, 2020

This looks like it should work 🤔
Do you have a full example that I can clone and run locally? I'd really like to try and solve this :)

@idoco
Copy link
Contributor

idoco commented Apr 3, 2020

Maybe the webdriverio hooks work differently than my selenium-webdriver example?
Maybe you should await the startup of the Chrome instance or before you start the recording?

@ghost
Copy link

ghost commented Apr 3, 2020

Hi, I have invited you as a collabarator for a sample project. Please have a look.

@idoco
Copy link
Contributor

idoco commented Apr 3, 2020

Thanks @harismahesh I will try to run this tomorrow

@qburst-hari
Copy link
Author

Hi @idoco got any chance to look into the files

@ghost
Copy link

ghost commented Apr 15, 2020

Hi @idoco , Also another issue I faced is I am not able to run testcases in parallel.

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