All exams are online now due to COVID related precautions | Download the app or write to us at info@vskills.in

Certified Selenium Professiona Learning Resources Event Firing

Learning Resources
 

Event Firing


JavaScript event firing uses the FireEvent method as -

ISelenium.FireEvent Method

Explicitly simulate an event, to trigger the corresponding "onevent" handler.
void FireEvent(
string locator,
string eventName
);
Parameters

locator
    an element locator
eventName
    the event name, e.g. "focus" or "blur"

The Selenium API command fireEvent example lets you trigger the event for a particular element on a page so fired the 'blur' event for the component

selSession.fireEvent("edit_field_1", "blur");