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

[Feature Request] Programmatic integration with Selenium Webdriver #117

Open
frodeseverin opened this issue Jan 4, 2023 · 1 comment
Open

Comments

@frodeseverin
Copy link

I am waiting for PR #61 to be merged.
This will enable better programmatic interface to validation in Python.

To further advance things, it would be nice to be able to validate HTML documents by passing a Selenium Webdriver object to the
get_messages()
function.

Use Case 1:
I need to validate some web-applications while I am logged in to the application, and access the messages programmatically.
Using Selenium in interactive mode I can easily log in to the webapp and run the validation on a speciffic page after navigating there.

Use Case 2:
I need to correct minor errors in a webpage to see the effect it has on validation.
Using Selenium in interactive mode coupled with the DevTools in the browser I can change the active document on the fly to correct errors and re-run tests.

Thoughts for a path forward:
I suppose an easy way to do this would be to save the output from Selenium.page_source.encode() to a temporary file and then pass that file to get_messages() from PR #61

@bemoody
Copy link

bemoody commented Jan 5, 2023

From what I remember of how vnu.jar works, there may not be any better option than writing the source to a temporary file. Java is just... a pain.

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