coldbox-modules / cbPlaywright

A library for integrating Playwright and TestBox
MIT License
9 stars 4 forks source link

Looking for Website Test Suggestions #3

Closed homestar9 closed 1 year ago

homestar9 commented 1 year ago

I want to contribute some more functionality to PlaywwrightMixins.cfm. Some ideas include things like selectOption() for interacting with <select> elements like this:

public any function selectOption( required any element, required string value ) {
    var options = createObject( "java", "com.microsoft.playwright.Locator$SelectOptionOptions" ).init();
    return arguments.element.selectOption( arguments.value, options );
}

I also want to write tests. However, I feel like we will need a website to test against with a bunch of different HTML elements that won't change very often - like an HTML5 "kitchen sink" example. I found one on CodePen (https://codepen.io/chriscoyier/pen/JpLzjd), but I'm not sure if relying on a codepen is a good idea. Does anyone have any suggestions?

Edit: Idea: What about setting up a Github page linked to the repo that would contain an HTML5 boilerplate document with a bunch of elements?

elpete commented 1 year ago

I would test against a page in this bundle. That way it's always under your control.