HomePhabricator

Browser test: avoid loading elements over network

Authored by hashar.

Description

Browser test: avoid loading elements over network

Page object let us search elements for which attributes match a given
regex. Unfortunatly it loads the list of elements first, then foreach
of them trigger a call to Selenium to retrieve the attribute to match.

Attempting to regex match a link href, would cause hundred of roundtrip
to the Selenium host.

Instead, use a CSS selector to get the element we are interested in
which skips the bad page object code.

Bug: T92613
Bug: T112291
Change-Id: I12949a4d0ef61d38adbaaf622722c89033949cad