webModelsByDeepCssOn this pageByDeepCss Locates a PageElement using a CSS selector capable of piercing shadow DOM-piercing Pro tip: Instantiate using By.deepCssHierarchySelectorByDeepCssIndex ConstructorsconstructorPropertiesvalueMethodsequalstoJSONtoStringConstructors constructornew ByDeepCss(value: string): ByDeepCssParametersvalue: stringReturns ByDeepCssProperties publicreadonlyvaluevalue: stringMethods externalequalsequals(another: TinyType): boolean@descCompares two tiny types by value@exampleComparing simple typesclass Id extends TinyTypeOf<string>() {}const id = new Id(`3cc0852d-fda7-4f61-874e-0cfadbd6182a`);id.equals(id) === true@exampleComparing complex types recursivelyclass FirstName extends TinyTypeOf<string>() {}class LastName extends TinyTypeOf<string>() {}class Age extends TinyTypeOf<number>() {}class Person extends TinyType { constructor(public readonly firstName: FirstName, public readonly lastName: LastName, public readonly age: Age, ) { super(); }}const p1 = new Person(new FirstName('John'), new LastName('Smith'), new Age(42)), p2 = new Person(new FirstName('John'), new LastName('Smith'), new Age(42));p1.equals(p2) === trueParametersexternalanother: TinyTypeReturns booleanexternaltoJSONtoJSON(): JSONValue@descSerialises the object to a JSON representation.@exampleclass FirstName extends TinyTypeOf<string>() {}const name = new FirstName('Jan');name.toJSON() === 'Jan'@exampleclass FirstName extends TinyTypeOf<string>() {}class LastName extends TinyTypeOf<string>() {}class Age extends TinyTypeOf<number>() {}class Person extends TinyType { constructor(public readonly firstName: FirstName, public readonly lastName: LastName, public readonly age: Age, ) { super(); }}const person = new Person(new FirstName('John'), new LastName('Smith'), new Age(42)),person.toJSON() === { firstName: 'John', lastName: 'Smith', age: 42 }Returns JSONValuetoStringtoString(): stringReturns string
Locates a PageElement using a CSS selector capable of piercing shadow DOM-piercing
Pro tip: Instantiate using By.deepCss