ConfigureWebCommand |
Top Previous Next |
×V4.2Ø
Syntax - ConfigureWebCommand <Command Name> <Event> <Firing Option> Where: <Command Name> is one of the following: TypeWebValue, SetWebDropDown, SendEnterToWebElement, SendKeyToWebElement. ClickWebElement <Event> is one of the following: Default, OnFocus, OnChange, OnKeyDown, OnKeyPress, OnKeyUp, OnBlur, FireWithMouseEvents, FireWithoutMouseEvents. <Firing Option> is one of the following: FireWithWait, FireNoWait, DoNotFire. Description: This command is used to configure which events are fired for a particular web command and how they are fired. An event is what makes a web page interactive When a button is clicked, for example, behind the scenes, an event is fired that tells the webpage how to respond - display results, go to a new page, open a search window, etc. The <Event> parameter specifies which event is being configured. The <Firing Option> parameter configures whether or not the event should fire and if EMUE should wait for it to complete before continuing. If an event is not configured, then it will fire and EMUE will wait for the event to finish before continuing. The normal operation of the TypeWebValue command is to send one character at a time to the web element and for each character, a series of events are also fired. When sending a single character, the following events are fired on the element: onFocus, onKeyDown, onKeyPress, onKeyUp, onChange, and onBlur. This event list provides the maximum assurance that the element will recognize the character as being "typed." In addition to firing each of these events, they are also fired with the FireWithWait option, which means that EMUE will wait for each event to finish before moving on to the next command. This creates two potential problems:
ConfigureWebCommand TypeWebValue OnBlur DoNotFire
ConfigureWebCommand TypeWebValue OnKeyDown DoNotFire ConfigureWebCommand TypeWebValue OnFocus FireNoWait There are also situations where the same behaviors affect other commands such as SetWebDropDown, SendEnterToWebElement or SendKeyToWebElement. For example, if you are sending a key stroke to a web element it might also generate a pop up dialog that could cause EMUE to appear to be hung. Again, this is because EMUE is waiting for the events to complete before it continues. In those cases, you have the ability to fire the events without waiting much like the examples above with TypeWebValue that will return control to EMUE so your script can continue. The two options, FireWithMouseEvents and FireWithoutMouseEvents, are only available on the ClickWebElement command. FireWithoutMouseEvents is the default value. Some buttons require additional events to successfully click on the button.
Soarian SmartUI: No Chrome: No
Sample 1: The following statement causes EMUE to fire all events on the TypeWebValue command, but prevents EMUE from waiting for the event to complete. This could also be accomplished using the SETSTARTUP command WebTypingOptimization with the FireEventsWithNoWait option. ConfigureWebCommand TypeWebValue Default FireNoWait
Sample 2: The following statement tells EMUE not to wait for the OnBlur event to complete when executing a SetWebDropDown command. Other events associated with a SetWebDropDown command are unaffected by this configuration. ConfigureWebCommand SetWebDropDown OnBlur FireNoWait
Sample 3: The following statement causes EMUE to fire all events on the SendEnterToWebElement command, but prevents EMUE from waiting for the events to complete. ConfigureWebCommand SendEnterToWebElement Default FireNoWait
Sample 4: The following statement causes EMUE to fire all mouse events on the ClickWebElement command. ConfigureWebCommand ClickWebElement FireWithMouseEvents FireNoWait
Sample 5: The following statement causes EMUE to fire an OnFocus mouse event on the ClickWebElement command. ConfigureWebCommand ClickWebElement OnFocus FireWithWait
See Also:
|