Selenium global CacheLookup with WebElement exclusions

121 Views Asked by At

I understand the basics of the Selenium [CacheLookup] tag, and that it can be applied to Web Elements to allow them to resolve more quickly on subsequent requests. Since most elements are candidates for this, I am seeking a way to apply a single "Global" [CacheLookup] to all Web Elements within a Page Object at once, and then for the rare elements that are too dynamic for this, have something like an [ExcludeFromCacheLookup] tag applied to those few elements, on an element by element basis. Does anyone know if this is possible? Better yet, is it possible to apply this format to an entire "Page Object" assembly (.Net project in my case)?

I've scoured the internet, but haven't found anything that states if it is or is not possible. This would be very useful in general, but being that I am retroactively applying this tag to existing elements, for which there are hundreds of them scattered among dozens upon dozens of Page Objects, it will be a huge time saver.

Thank you for any tips!

0

There are 0 best solutions below