Browser test: avoid loading elements over network
authorAntoine Musso <hashar@free.fr>
Wed, 8 Jul 2015 16:32:53 +0000 (18:32 +0200)
committerHashar <hashar@free.fr>
Thu, 17 Sep 2015 13:07:30 +0000 (13:07 +0000)
commitd737e5762438b72bd2b1ec10937555b32b664788
tree12b11e0d41356d959db0a092db5a091accad2e41
parentc1b2187badc784e546ba4e6b5be30f146fb9ac13
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
tests/browser/features/support/pages/main_page.rb
tests/browser/features/support/pages/preferences_appearance_page.rb
tests/browser/features/support/pages/view_history_page.rb