Micro Focus QTP (UFT) Forums
WebElement("WebElement").Click is not working - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: WebElement("WebElement").Click is not working (/Thread-WebElement-WebElement-Click-is-not-working)



WebElement("WebElement").Click is not working - sia sharma - 06-11-2012

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?


RE: WebElement("WebElement").Click is not working - ravi.gajul - 06-11-2012

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


RE: WebElement("WebElement").Click is not working - sia sharma - 06-13-2012

Hey it works :-)

Thank you ravi .....


RE: WebElement("WebElement").Click is not working - ycmallikarjuna - 09-26-2012

Thanks Ravi. Your solution works for me.


RE: WebElement("WebElement").Click is not working - Ansh123 - 03-19-2014

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


RE: WebElement("WebElement").Click is not working - muhammad.iliyas08 - 09-26-2016

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


RE: WebElement("WebElement").Click is not working - supputuri - 09-28-2016

(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.


RE: WebElement("WebElement").Click is not working - supputuri - 09-28-2016

(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.