Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Click object
#5
Not Solved
Okay - I figured it out. Thank you so much. I actually just did this :

Code:
If  ElementsCollected(CurrentRow).GetROProperty("innerhtml") = Del Then
                                   ElementsCollected(CurrentRow).Click

If the button here on this row is Delete - Click it.
Now on to the second issue. The Column on the page that holds all of the Delete buttons sometimes includes a blank instead of Delete. So, If my record is the 5th one and there is a blank on the 4th record. So X,X,X, ,X,X. It collects the Deletes, and says I see 5. The Row I want to Delete is 5, but since it is blank, it will go to the 5th 'X' which is really the 6th row.

Is there a way I can set up two object descriptions :

Like this:
Code:
Set oDesc = Description.Create()
                  oDesc("micclass").Value = "WebElement"
                  oDesc("class").Value = "x-grid3-cell-inner x-grid3-col-5"
                  oDesc("innerhtml").Value = "[<SPAN].*"

                'Set nDesc =Description.Create()
                 ' nDesc("micclass").Value = "WebElement"
               '   nDesc("class").Value = "x-grid3-cell-inner x-grid3-col-5"
                 ' nDesc("outerhtml").Value = "[<DIV].*"


And then set the total elements collected to include both? Like grab all Delete buttons and all Blanks. In this way, it will stop at the 5th row, try to Delete it and realize it can't and skip out with a message instead of deleting the wrong record.

So something like this - would it work:
Code:
Set ElementsCollected = Browser("Suppliers and Invoices").Page("Suppliers and Invoices").WebTable("Supplier Payments").ChildObjects(oDesc,nDesc)


How do I get both in the same collection?

Thanks - Charles
Reply


Messages In This Thread
Click object - by wheelercha - 03-16-2010, 04:29 AM
RE: Click object - by manishbhalshankar - 03-17-2010, 12:42 PM
RE: Click object - by wheelercha - 03-23-2010, 08:12 PM
RE: Click object - by manishbhalshankar - 03-24-2010, 10:42 AM
RE: Click object - by wheelercha - 03-24-2010, 07:47 PM
RE: Click object - by manishbhalshankar - 03-25-2010, 11:12 AM
RE: Click object - by wheelercha - 04-06-2010, 12:46 AM
RE: Click object - by VikramWakhlu - 06-20-2011, 07:18 PM
RE: Click object - by parminderdhiman84 - 06-20-2011, 11:30 PM
RE: Click object - by VikramWakhlu - 06-21-2011, 07:06 PM
RE: Click object - by VikramWakhlu - 06-21-2011, 10:01 PM
RE: Click object - by parminderdhiman84 - 06-22-2011, 11:30 AM
RE: Click object - by VikramWakhlu - 06-22-2011, 03:04 PM
RE: Click object - by VikramWakhlu - 06-23-2011, 02:47 PM
RE: Click object - by parminderdhiman84 - 06-23-2011, 04:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation UFT doesn't recognize object in SAP at first, but recognize it after i click debug CedricMab 3 6,674 02-06-2017, 07:09 PM
Last Post: nguyen4685
  Click on Object rajeshdizzy 0 2,013 07-10-2009, 03:10 PM
Last Post: rajeshdizzy

Forum Jump:


Users browsing this thread: 3 Guest(s)