Quality Testing

Quality is delighting customers

Can you please any explain about Fire Event method

Views: 915

Reply to This

Replies to This Discussion

Fire Event is Basically used when we want to trigger any specific event on an object

below is the list of Valid events

  • onchange
  • onclick
  • ondblclick
  • onblur
  • onfocus
  • onmousedown
  • onmouseup
  • onmouseover
  • onmouseout
  • onsubmit
  • onreset
  • onpropertychange

Many Time Object not respond on standard way of triggering

Here i wan to double click on the given Web Button but there is not standard way to doubleclick the web button and neither simple click works

Example

Browser("ABC").Page("XYZ").WebButton("Button1").Click

So here we need to use FireEvent method as below

Browser("ABC").Page("XYZ").WebButton("Button1").FireEvent “ondblclick”

This is my favourite interview question :).

QTP executes test scripts in two ways.

1. Event Operations

2. Mouse & Keyboard operations

By default QTP goes #1 but sometimes applications required physical movement of mouse (bcz developers made code like that) so #1 wont work, you need #2.  For #2 you can use FireEvent method of object.

You can also replace #1 using Setting.WebReplay package value to 2 but it slower your execution speed.  Hope this gives better picture.

--Subbu.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service