-
Notifications
You must be signed in to change notification settings - Fork 97
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
Events support #123
Comments
Events can be a bit weird in PS... you might want to throw event handling all in a background runspace so you can use Register-ObjectEvent for them without also being dependent on the main runspace being available to handle events. Of course... I guess that can come with its own problems, I suppose. Hmm. |
Indeed. I was not looking to register events when the module is loaded and manage them through the session. (These are "draft thoughts")
When calling it, it would register the handlers and wait for specified elements to be loaded and return once the timeout expired or all the specified elements are loaded. Use case This potential cmdlet would wait for all components to be loaded and return (or start a job with -- As for the other driver events, I was also thinking about a cmdlet to "design tests" so you'd have events registered and start listening for user input / actions — eg: Start-SeInteractiveSession / Stop-SeInteractiveSession (name pending) That cmdlet would be specifically more of a "design time" cmdlet rather than generic use case. -- Therefore, events themselves would not be popping up everywhere at all time but rather be used in the bounds of specific cmdlets. ( That said, if I find out there's a direct / indirect event for when user close the browser, I might want to look into including something so I can manage removal from the internal list of browser if / when detected. ) |
Yeah that would probably make a lot more sense. Looking forward to it! |
Keeping this in mind for later but I need to remove it from V4.0 milestone if I want to release at the planned date. |
There's some interesting stuff that I'd like to add regarding events.
All driver events
This could be used in other things alongside with a method that would start listening user action and build Selenium Powershell output based on events that occurred.
It kind of ties in with #84 but in some way better because you could do it all from the module.
I can see some additional uses from things like FindElementCompleted to allow the possibility to calculate the amount of time multiple elements appear on the page (To measure performance )
https://www.selenium.dev/selenium/docs/api/dotnet/html/N_OpenQA_Selenium_Support_Events.htm
The text was updated successfully, but these errors were encountered: