Closed Bug 554889 Opened 15 years ago Closed 15 years ago

[mozmill] Could not validate element Name: ship_fname in testSaveFormInformation (testClearFormHistory.js)

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

()

Details

(Whiteboard: [mozmill-test-failure][fixed by bug 604832])

Attachments

(1 file)

We fail with: could not validate element Name: ship_fname with value John
Whiteboard: [mozmill-test-failure]
(In reply to comment #0) > We fail with: > > could not validate element Name: ship_fname with value John I ran testClearFormHistory.js with test from both branches (Default & 1.9.1) through FFX 3.6.3 & FFX 3.5.9. The test is working on my machine. (Mac OSX 10.6) I scanned through the code, and it appears that testSaveFormInformation() is validating John using firstName DOM element. Hmm. Would you know which line's failing?
Kenny, you should probably run not only the test but the complete folder to check if the failure occurs for you. Sometimes we still have dependencies between tests which can cause such a misbehavior and you do not see the failure when running the test on its own.
It appears that auto-complete list only appears when the browser window is in-focus. When browser window is out of focus, the auto-complete list won't appear. As a result, when running testClearFormHistory.js, if you just leave it running, browser window should be focused automatically - As a result, the test passed. However, for example, if you are working on some other stuff, and just kick off the tests in the background - Meaning the browser window will not have focus, since you're working on something else - the test will fail because the auto-complete list won't show up if the browser window is not in focus. Would this be a real defect to the Mac FFX? Or is this an as-designed feature?
Mozmill tests do not run in the background. Once initiated, you should let them finish before doing anything on your computer.
(In reply to comment #5) > Mozmill tests do not run in the background. Once initiated, you should let > them finish before doing anything on your computer. Mozmill tests can run in the background but some actions are still causing problems. Those are mostly some click or keypress events. I have filed bug 558743 to get this sorted out. Kenny, thanks for your analysis. Could you please test the following: http://hg.mozilla.org/qa/mozmill-tests/file/ce49be6ae247/firefox/testFormManager/testClearFormHistory.js#l85 Instead of directly synthesize a keypress onto the text field can you please synthesize a click event before to set the focus to that field and then change the first parameter of the keypress to 'null'? That way we fire the key event against the window, which event handler it will forward to the text field then. Does it help when running the browser in the background?
(In reply to comment #6) > Instead of directly synthesize a keypress onto the text field can you please > synthesize a click event before to set the focus to that field and then change > the first parameter of the keypress to 'null'? That way we fire the key event > against the window, which event handler it will forward to the text field then. > Does it help when running the browser in the background? Unfortunately, it didn't help. Original: controller.type(firstName, fname.substring(0,2)); New: controller.click(firstName); controller.type(null, fname.substring(0,2)); Mozmill still couldn't find the auto-complete dropdown list: controller.assertProperty(popDownAutoCompList, "popupOpen", true);
Thanks Kenny for the testing. So it looks like that synthesizeKey and synthesizeMouse cannot focus an element when the browser window is not in the foreground. Neil, is that a known problem in EventUtils or is it a general focus problem we cannot solve at the moment?
OS: Mac OS X → All
Summary: [mozmill] Failure in testClearFormHistory.js → [mozmill] Could not validate element Name: ship_fname in testSaveFormInformation (testClearFormHistory.js)
(In reply to comment #8) > Neil, is that a known problem in EventUtils or is it a general focus problem we > cannot solve at the moment? Neil, it would be better if you could give an answer on bug 558743 instead. Thanks.
Attachment #445371 - Flags: review?(hskupin)
Comment on attachment 445371 [details] [diff] [review] Patch file for testClearFormHistory.js >+++ b/firefox/testFormManager/testClearFormHistory.js > * Contributor(s): > * Aakash Desai <adesai@mozilla.com> >+ * Mark Locklear<marklocklear@gmail.com> Please add a space between your name and the email address. > // Verify form completion in each inputted field > var popDownAutoCompList = new elementslib.ID(controller.window.document, "PopupAutoComplete"); > [..] > > controller.assertProperty(popDownAutoCompList, "popupOpen", true); > controller.keypress(firstName, "VK_DOWN", {}); >+ controller.keypress(firstName, "VK_RETURN", {}); > controller.click(popDownAutoCompList); > controller.assertValue(firstName, fname); Using return here is a good idea but it makes the click call unnecessary. I would advise to use the keypress for the first name check and the click for the last name check. The errors we are seeing are related to popDownAutoCompList. Please check if we really use the correct element here. >diff --git a/readme.txt b/readme.txt >deleted file mode 100644 This shouldn't be a part of this patch.
Attachment #445371 - Flags: review?(hskupin) → review-
Assignee: nobody → marklocklear
Status: NEW → ASSIGNED
...hey Anthony, sorry for the delay on this. I'm still having problems using DOMi to get the XPath of the lastname box. I'm starting an internship this week, and will be tied up most of this week, and July 4th coming up this weekend. Anyway I'll try and catch you online in the afternoon next??? Thanx!
Assignee: marklocklear → hskupin
Component: Form Manager → Mozmill Tests
Depends on: 604832
No longer depends on: 558743
Product: Toolkit → Testing
QA Contact: form.manager → mozmilltests
Whiteboard: [mozmill-test-failure] → [mozmill-test-failure][will be fixed by bug 604832]
Last failure of this test occured on 2010-10-22 right before we checked-in the patch on bug 604832. Lets mark this bug as fixed.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-test-failure][will be fixed by bug 604832] → [mozmill-test-failure][fixed by bug 604832]
Move of Mozmill Test related project bugs to newly created components. You can filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Product: Testing → Mozilla QA
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: