Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WebElement("WebElement").Click is not working
#1
Solved: 11 Years, 3 Months ago Exclamation 
Hello everyone...

i m testing a website ... and was trying to execute the following code
Code:
Browser("xyz").Page("abc").WebElement("WebElement").Click

on clcik of this....
Browser("pqr") should open...

code:
Code:
Browser("abc").Page("xyz").WebElement("WebElement").Click

If  Browser("pqr").Exist Then
Reporter.ReportEvent micPass,"pass","valid"
else
Reporter.ReportEvent micFail,"fail","invalid"
End If
if return code is like this ...it gives pass result but does not open
browser (pqr)

plz suggest me what to do?
Reply
#2
Solved: 11 Years, 3 Months ago
Hi,
Please confirm if the below code highlights the WebElement
Code:
Browser("xyz").Page("abc").WebElement("WebElement").Highlight
If the above element is highlighted, please try by changing the replay type
Code:
Setting.WebPackage("ReplayType") = 2 '2-Runs mouse operations using the mouse
Browser("xyz").Page("abc").WebElement("WebElement").Click
Setting.WebPackage("ReplayType") = 1  '1-Runs mouse operations using browser events

If it doesn't work please post the properties of the webelement
Reply
#3
Solved: 11 Years, 3 Months ago
Hey it works :-)

Thank you ravi .....
Reply
#4
Solved: 11 Years, 3 Months ago
Thanks Ravi. Your solution works for me.
Reply
#5
Solved: 11 Years, 3 Months ago
Hello,

I have a similar issue except that OR recognizes the webelement inside a frame. So the code looks something like that

Code:
Browser(xyz).page(abc).frame(pqr).webelement("webelement").click

I added the code that you suggested above but QTP gives error saying it has recognized more than one object with same properties. It tried giving indexnumbers and html tag but it did not work. The problem is that it has two webelements with the same name.

Any help would be appreciated.

Thanks
Reply
#6
Solved: 11 Years, 3 Months ago
Hi ,

I want to ran 10 Scripts ,10 HTML results are getting.

But as Client requirement , 10 Scripts of 10 HTML Test Results want in 1 Consolidated report please help to write a code.

Thanks,
Iliyas
Reply
#7
Solved: 11 Years, 3 Months ago
(09-26-2016, 08:02 PM)muhammad.iliyas08 Wrote: Hi ,

I want to ran 10 Scripts ,10 HTML results are getting.

But as Client requirement , 10 Scripts of 10 HTML Test Results  want in 1 Consolidated report please help to write a code.

Thanks,
Iliyas

Hey Muhammad,
Can you please post another query and we are more than happy to help you. 
Please do mention how you are running 10 scripts.
Thanks,
SUpputuri
Reply
#8
Solved: 11 Years, 3 Months ago
(03-19-2014, 06:53 PM)Ansh123 Wrote: Hello,

I have a similar issue except that OR recognizes the webelement inside a frame. So the code looks something like that

Code:
Browser(xyz).page(abc).frame(pqr).webelement("webelement").click

I added the code that you suggested above but QTP gives error saying it has recognized more than one object with same properties. It tried giving indexnumbers and html tag but it did not work. The problem is that it has two webelements with the same name.

Any help would be appreciated.

Thanks
which element in the hierarchy is giving the error message. Check Frame element from OR, if it's identifying then highlight webelement. so that you can nail down the exact element which is having issue. (OR) you can see the error message which gives the information regarding the object which is not unique.
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Click after CheckProperty to a WebElement passed via Function argument fails naruoga 0 1,142 02-28-2019, 11:46 AM
Last Post: naruoga
  Unable to capture value of Webelement which is changing dynamically sheetal 9 16,166 02-16-2018, 11:01 AM
Last Post: janki_kakadia
  Unable to click on dynamically changing webelement preeti 0 1,791 04-29-2017, 08:50 PM
Last Post: preeti
  How to get the Webelement object name. Shilpa Gorantla 1 2,527 07-29-2016, 03:53 PM
Last Post: Shilpa Gorantla
  QTP not selecting appropriate webelement from the webtable..Need Solution satishkumarm 11 21,564 03-23-2016, 12:47 PM
Last Post: Swetha_Bayya

Forum Jump:


Users browsing this thread: 1 Guest(s)