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

playwright component testing control url #33755

Open
1 task done
pan-alexey opened this issue Nov 25, 2024 · 6 comments
Open
1 task done

playwright component testing control url #33755

pan-alexey opened this issue Nov 25, 2024 · 6 comments

Comments

@pan-alexey
Copy link

Please do not submit this issue.

  • I understand
@pan-alexey
Copy link
Author

I'm trying to use Playwright component testing, but I need to use a remote browser. Are there any ways to use component testing with a remote browser and HTTP over SSH (like ngrok)?

@mxschmitt
Copy link
Member

The following should work for you: #26482

I'm not sure I follow what "and HTTP over SSH (like ngrok)" is.

@pan-alexey
Copy link
Author

Thank you very much for your response. I will try to explain my use case. I need to run Playwright tests, but I want to use the browsers on my computer to do this, connecting to the browsers similarly to a Selenium Grid setup.

When running component tests, I observe that the browser opens the link http://localhost:3100. However, because the browser is not on my local device, I need to establish a tunnel (such as using https://ngrok.com/docs/http/).

So, I need to first set up a tunnel from http://localhost:3100 to http://mytunnelip so the remote browser can open my page.

Therefore, I need to:

  1. Be able to assign a port for the server 3100.
  2. Replace the address http://localhost:3100 with http://mytunnelip in the component test.

The address http://mytunnelip is just an example.

@pan-alexey
Copy link
Author

Hmm, find in code, very 😊
Image

@pan-alexey
Copy link
Author

But is very strange, becous i can not rewrite base url. I have fixture for rewrite base url, but in ct browser always try open http://localhost:8001/

Error message:

    Error: net::ERR_CONNECTION_REFUSED at http://localhost:8001/
    Call log:
      - navigating to "http://localhost:8001/", waiting until "load"

How can i rewrite base url before start component testing?

@pan-alexey
Copy link
Author

Any idea, why a can not use fixture for rewrite baseUrl?

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