Closed Bug 875075 Opened 11 years ago Closed 11 years ago

Improve markup in the user area to make QA automation more straightforward

Categories

(Mozilla Reps Graveyard :: reps.mozilla.org, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: hoosteeno, Unassigned)

Details

(Whiteboard: [kb=981480])

:rbilings is working down this prioritized list of functional areas on reps, building QA automation using Selenium:

https://remo.etherpad.mozilla.org/qa-automation

This work is important. It's also difficult because the markup isn't optimized for automation. Here's is a good reference for understanding Selenium locators:

http://marakana.com/bookshelf/selenium_tutorial/locators.html

The locators on that page are listed in rough order of preferability. Right now our markup only accommodates the locators listed well down on the list; ideally, we'd provide better hooks for automation on key elements using ids, names, and unique classes.

:rbillings, can you offer some concrete examples of specific improvements we can make in the user area? Those will help us make similar improvements elsewhere.

We'll open separate bugs for other items on the list of prioritized reps functions.
Whiteboard: [kb=981480]
The locators page link above is the example I'd hand out on good practices. What I'm looking for are more unique or differentiated locators within each page.
Here is a practical example: if I want to edit the City name in Edit Profile the xpath for the field looks like this:

html.js body div#wrapper div.container form.custom div.row div.six div.row div.eleven input.input-text

Instead of using 'row' or numbers it would be more helpful to name them after sections of the page. Here is an example from Addons for editing the Homepage field of the user's profile:

html body.html-ltr div#page.c div#user_edit.primary form.user-input div#user-edit.tab-wrapper div#user-account.tab-panel fieldset#profile-personal ol.formfields li input#id_homepage
Hi Rebecca. I revisited this bug after some attempts to make QA automation in user profile easier.
We have done some work about that, tracked here:
https://bugzilla.mozilla.org/show_bug.cgi?id=906068

Is there anything else we can do regarding this bug?
Flags: needinfo?(rbillings)
The bug above has been addressed. I think from here on out new bugs can be filed if new locators need to be added. Hopefully new locators will be added in with new code by habit from here on out.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(rbillings)
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Product: Mozilla Reps → Mozilla Reps Graveyard
You need to log in before you can comment on or make changes to this bug.