Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Want to Automate clicking on Menu items
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
I'll try to clarify.

First using DP ignores the OR, but I'm sure you knew that.

When using DP, you must be very specific in your object to get only one object. You might try using HTML ID instead of Text. If you have a dozen links on a page that all have the text of "Edit", they will all be returned in the child objects and you can use the index key to get the one you want.
Code:
linkarray(0).Click

That is what this did. You can change the "0" to the index option you need. When you use a .NET Grid or List object that is the only way to click the correct link in the data. There are ways to search the table for the row you need, provided there is a unique key or data, then use that as the array index as well.

In my click framework, I pass the index with a default of "0" so at the very least it will click the first object in the array.

Be sure you are setting your micclass. Also, try using Regular expressions to search for the text of the link. That might help narrow down the objects array so you won't have to deal with the indexing.

I hope this helps.
I don't think I explained that very well, so I decided to share my framework. I'm sure there is a lot of room for improvement but it suits my needs and makes it very simple for my team to reuse the code.

There are some page/browser variables you need to set at the top of the code to work with the website you are working with. After that it the framework should work fine. I generally include another library setting those values, but for this upload it's all one file.

Documentation is always a work in progress for me, so I apologize if it's a little lax in some areas.

I hope you find this useful.


Attached Files
.txt   webframework.txt (Size: 24.41 KB / Downloads: 136)
Reply


Messages In This Thread
RE: Want to Automate clicking on Menu items - by jsknight1969 - 09-08-2010, 08:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to fetch items from WpfList in UFT saurabhkumar_gupta 0 2,453 03-08-2015, 09:17 PM
Last Post: saurabhkumar_gupta
  Can't locate items on Win7 Desktop RandomGrin 0 2,074 01-30-2015, 10:55 PM
Last Post: RandomGrin
  QTP not clicking on the flex button sudheerch 2 3,624 12-03-2013, 12:56 PM
Last Post: sudheerch
  Clicking command button in accesss form mark_cielos24@yahoo.com 1 3,356 05-07-2013, 10:52 PM
Last Post: agarwl.anurag
  Problem in selecting multiple items in the weblist vijay44 7 18,272 08-10-2011, 06:22 PM
Last Post: gaveyom

Forum Jump:


Users browsing this thread: 1 Guest(s)