Does SilkTest support the IE Auto-Complete functionality within the browser?
SilkTest does not support this particular functionality, however, here are some suggestions when dealing with IE Auto-Complete.
- If it is the textbox and not the dropdownlist facility which is being tested, then our recommendation would be not to use the Auto-Complete feature as part of testing. Use the SetText method to enter in the full information instead of invoking the Auto-Complete"s dropdownlist by entering a letter.
SetText ("Werth") //instead of TypeKeys("we")
- If while the script is being recorded, the IE Auto-Complete dropdownlist keeps becoming invoked, then turn off the Auto-Complete altogether. This can be done by going into the Tools/Internet Options, under the Content tab, click the AutoComplete button located in the Personal Information section. Once the AutoComplete Settings dialog box opened, UNcheck the "Forms" checkbox to disable the functionality completely.
- If part of the testing must include working with the IE Auto-Complete, then it would be a good idea to try the following workarounds. If using WinNT/Win2k, both workarounds should serve their purpose. However, if using WinXP, the second workaround, which although slow and not very robust, can be controlled by the tester and is worth a try.
Here are two options which should allow the problem to be worked around. Both example are using the GMO2 website.
- To be able to invoke the ListView, Typekeys must be used to enter the initial data as SetText won"t do it.
- After SilkTest has chosen from the ListView, the GMO web page must be deliberately SetActive again before any data can be added into the next textbox.
This workaround will play back on WinNT but will not do so on WinXP. It cannot chose from the Listview.
[-] testcase one () [ ] WelcomeToGreenMountainOutp.SetActive( ) [ ] WelcomeToGreenMountainOutp.EnterGMOOnLine.Click () [ ] OnlineCatalog.TheseAreTheItemsCurrently.OrderQuantity.N29999.SetText("1") [ ] OnlineCatalog.PlaceAnOrder.Click () [ ] PlaceOrder.ProceedWithOrder.Click () [ ] sleep(5) [ ] BillingInformation.Name1.TypeKeys("We") //TypeKeys method is used invoke the dropdownlist. [ ] DialogBox1.SetActive () //specifically setting the dropdownlist active. [ ] DialogBox1.ListView1.Select ("Werth") //Select method is used to choose from the options in the list. [ ] BillingInformation.SetActive() //specifically setting the web page active again. [ ] BillingInformation.Address1.TypeKeys("We") [ ] DialogBox1.SetActive () [ ] DialogBox1.ListView1.Select ("Weg 21") [ ] BillingInformation.SetActive()
This workaround is much less robust than the previous one and must be maintained so as the correct option is always chosen.
- TypeKeys and Sleep must be used in order to invoke the dropdownlist.
- Then TypeKeys is used throughout to negotiate the way down the list and use key to chose an option.
- The replay on this is quite slow
- The problem with this script is that it relies on the list positions remaining unchanged, ie; . As more contact details are added to the DB, the list of options will grow and the positions will change.
- This runs fine on WinNT and WinXP
[-] testcase two () [ ] WelcomeToGreenMountainOutp.SetActive( ) [ ] WelcomeToGreenMountainOutp.EnterGMOOnLine.Click () [ ] OnlineCatalog.TheseAreTheItemsCurrently.OrderQuantity.N17999.SetText("1") [ ] OnlineCatalog.PlaceAnOrder.Click () [ ] PlaceOrder.ProceedWithOrder.Click () [ ] BillingInformation.Name1.TypeKeys("We") [ ] Sleep(1) [ ] BillingInformation.Name1.TypeKeys("") [ ] BillingInformation.Address1.TypeKeys("We") [ ] Sleep(1) [ ] BillingInformation.Address1.TypeKeys("") [ ] BillingInformation.City1.TypeKeys("Ha") [ ] Sleep(1) [ ] BillingInformation.City1.TypeKeys("") [ ] BillingInformation.State1.TypeKeys("Ge") [ ] Sleep(1)