Forum Discussion
Hi Tanya,
Thanks for your help.
Here the issue is not with the finding object, I am able to grab the object successfully but the onClick event is not getting executed correctly.
However I found root of this. The issue is that onClick method "myJS.SaveChanges();" is not returning any value. So TestComplete was not able to identify that respective method got executed or not. When I manually put "return true;" at the end of myJS.SaveChanges() method and ran the script it worked!
So I am gonna have to contact Dev team regarding this and see what we can do.
Thanks everyone!
- Vivek7210 years agoContributor
Hi Chandresh
I came across the same problem and need to find f the solution you applied can help me too.
Could you please give me an example how you did this:
"When I manually put "return true;" at the end of myJS.SaveChanges() method and ran the script it worked!"
And could you also give me sample script that makes it work? I use vbscript and my script goes as follows:
Set acceptbtn = cell.FindChildByXPath("//*[@onclick='inlineGridEditor.saveItem(0)']",False)
Call acceptbtn.Click
When I run the above code it identifies the object but throws 'click method doesn't work for the object' error. The cell object mentioned doesn't have any child objects in my TC object browser. So I had to use findchildbyXpath method to find the element.
It would be of great help to me if anyone can help me out on this.
Thanks & Regards
Prashanth
Related Content
Recent Discussions
- 17 hours agotramuntana
- 3 days agoSlickRick