03-24-2010, 07:47 PM
(This post was last modified: 03-24-2010, 07:54 PM by wheelercha.)
Okay - I figured it out. Thank you so much. I actually just did this :
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:
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:
How do I get both in the same collection?
Thanks - Charles
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