Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If I run my script in new browser then script fails,
#1
Not Solved
If I run my script in new browser then script fails, reason QTP is not understanding onBlur event.
But if I run the same script second time without closing previously opened browser it is working fine.

Ordering of fields are
1. Text box1
2. Drop down ( Drop down is auto populated on the blur event of Text box1)
3. Text box2

Code is like
Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","C:\Documents and Settings\admin","open"

Browser("Browser").Page("Welcome to PAYMENT").Frame("HtmlFrame").WebEdit("CARDNUMBER" ).Set DataTable("CARD_NUMBER", dtLocalSheet)

Browser("Browser").Page("Welcome to PAYMENT").Frame("HtmlFrame").WebEdit("CARDNUMBER").FireEvent("onblur")

I am not able to understand why same script works If I keep the previously opened browse, since code is to open the new browser everytime.
Reply
#2
Not Solved
Can you try following.

object.FireEvent EventName, [x], [y], [BUTTON]
in case of left button '0' and right button '0' and try giving x and y coordinate.
Reply
#3
Not Solved
Hi,
I am not clicking on the drop down to select value. I enter some text in the text box 1 and based on that text, value of drop down gets populated. But If i fill up the form manually then it is working fine. If I run the script then it is not working.

Now to resolve this issue, I am directly entering the URL in Record and Run setting box and script is working fine. (seems strange solution, but working for now)
Previously I was using
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","C:\Documents and Settings\admin","open"
to open the browser.


Thanks
Rajani
Reply
#4
Not Solved
can you try wait command

Give wait command after entering first text box script line

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","C:\Documents and Settings\admin","open"

Browser("Browser").Page("Welcome to PAYMENT").Frame("HtmlFrame").WebEdit("CARDNUMBER" ).Set DataTable("CARD_NUMBER", dtLocalSheet)
Wait(5)
Browser("Browser").Page("Welcome to PAYMENT").Frame("HtmlFrame").WebEdit("CARDNUMBER").FireEvent("onblur")

See you can use direct application URL in systemutill command not necessary to open IE if your application is web app
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to close/restart UFT in "Not responding" status with AOM script CharlieMadrid 0 1,257 05-21-2020, 08:46 PM
Last Post: CharlieMadrid
  General run error when Exist fails msacks 1 1,899 02-08-2019, 02:12 AM
Last Post: Ankur
  Find the email using subject with the help of vb script Raheem Shaik 0 1,752 12-12-2018, 02:57 PM
Last Post: Raheem Shaik
  Need script to connect remote machine stalinvanama 1 1,695 09-27-2018, 08:12 PM
Last Post: stalinvanama
  "UFT has stopped working" is displayed during running the script kotaramamohana 0 1,355 08-24-2018, 01:07 PM
Last Post: kotaramamohana

Forum Jump:


Users browsing this thread: 1 Guest(s)