Changes between Version 95 and Version 96 of DeveloperGuidelinesTesting


Ignore:
Timestamp:
12/19/10 00:03:20 (11 years ago)
Author:
Fran Boon
Comment:

Autocomplete is fiddly to test as need to trigger specific events

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesTesting

    v95 v96  
    2929 * Improving the stability of Selenium tests: http://googletesting.blogspot.com/2009/06/my-selenium-tests-arent-stable.html
    3030 * Lots of useful tips: http://www.eviltester.com
     31 * Autocomplete is fiddly to test as need to trigger specific events:
     32{{{
     33# Enter the search String
     34sel.type("gis_location_autocomplete", "SearchString")
     35# Trigger the event to get the AJAX to send
     36sel.fire_event("gis_location_autocomplete", "keydown")
     37# Wait for the popup menu
     38for i in range(60):
     39    try:
     40        if "SearchString" == sel.get_text("css=ul.ui-autocomplete li:first-child a"):
     41            break
     42    except:
     43        pass
     44    time.sleep(1)
     45else:
     46    self.fail("time out")
     47# Select the Result
     48sel.fire_event("css=ul.ui-autocomplete li:first-child a", "mouseover")
     49sel.click("css=ul.ui-autocomplete li:first-child a")
     50time.sleep(4)
     51}}}
    3152
    3253Systers' approach: