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

[QUESTION] Running try-playwright on windows. #215

Closed
shtlrs opened this issue Jun 17, 2021 · 4 comments
Closed

[QUESTION] Running try-playwright on windows. #215

shtlrs opened this issue Jun 17, 2021 · 4 comments

Comments

@shtlrs
Copy link

shtlrs commented Jun 17, 2021

Hi,

**TL;DR: Is there a way to run try-playwright on windows ? **

Idea:

I'm a programming enthusiast and I've convinced my company to migrate towards using playwright instead of the old techno they were using.

I always work in python on my personal projects and one thing I like a lot in Python is the interactive console, or playground.

The thing is, at my company, we use TS/JS so I came across this repo and I was wondering if it was possible to execute it on windows.

I saw it requires using bash & Kubernetes, which are not things I'm familiar with.

So I was wondering, Is there a way to run try-playwright on windows ?

@mxschmitt
Copy link
Owner

Hi,

I personally have it running on k3s which is a lightweight Kubernetes engine which is unfortunately not available on Windows. In theory you should be able to run this thing on any Kubernetes engine, including Docker for Windows with Kubernetes support.

Regarding instructions, it should be pretty much what is in the readme, except the k3s setup part then. You probably need to use WSL or gitbash to be able to generate the configuration files.

What is the reason to not use the publicly hosted Try Playwright instance?

@shtlrs
Copy link
Author

shtlrs commented Jun 17, 2021

Alright I see, I will try to make it work.

And the reason is that I simply didn't come across it.

And the purpose of the whole research that I'm doing is to execute playwright code line by line.

For example, I want to do await page.goto(someUrl) and then I try to playaround a bit with what's present in that page interactively.
Which I think the publicly hosted Try Playwright instance doesn't cover, right ?

@mxschmitt
Copy link
Owner

No it doesn't, but keep in mind, that the current architecture will always throw away the worker instances after a request has finished. So its probably non-trivial to keep state there.

@shtlrs
Copy link
Author

shtlrs commented Jun 17, 2021

Maybe, but the reason I'm searching for such a thing is to avoid the overhead of running a lot of steps until I reach a specific point to evaluate something in the test.

For example if I have a test that has these steps

1-Login as employee
2- Create a custom field for the invoice's form
3 - Add an invoice
4- Send the invoice for validation
5- Login as Manager and check that the received invoice contains correct data.
6- Validate the invoice.
7- Login as accountant and do a second data integrity check.
8- Archive Invoice
9- Login as employee and check that the invoice has been archived

If something's wrong with the test written for step 9, we wouldn't want to re-execute all the previous 8.

By, having some sort of a REPL where we could launch an instance of a browser and execute playwright code like page.click(querySelector) and then page.fill(querySelector, text) I could login with the previously generated account and try out playwright code to evaluate the behavior.

I hope this makes sense.

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