Hello
I have a unique scenario. I am searching a website for a supplier name.
When it found it returns a link for it. One time it could be CompanyABC,
another time CompanyXYZ etc, but each time the find (parametertised) finds
a company it's link is different. Sample code below. How would I edit
this to just click on the link no matter what is there? The below code is
hard coded to "Michigan Coating Products" when what I really need is for it
to click whatever appears. There should be a value everytime because it is
pulling the data from SAP. Any ideas? Please advise and thanks. -R-
Dim record_count
record_count = DataTable.GetSheet("SOLNShippingData").GetRowCount
For i = 1 to record_count 'sets the number for entries on the
SOLNShippingData ActionPg for parameter PurOrdNum for "For Loop"
'set value of "a" and "b"
a=Datatable.Value("PurOrdNum","SOLNShippingData") 'Sets "a" to whatever
value is in parameter PurOrdNum of sheet SOLNShippingData.
If a <> "Dup Already Converted" Then 'reads if not equal to "Dup
Already Converted" run, skip if is = to "Dup Already Converted"
b=Datatable.Value("PurOrdSupplier","SOLNShippingData") 'Sets "b" to
whatever value is in parameter PurOrdSupplier of sheet SOLNShippingData.
Browser("SAP NetWeaver Portal").SAPPortal("SAP NetWeaver
Portal").Frame("155922_FRAME").SAPEdit("Name of Company").Set b
Browser("SAP NetWeaver Portal").SAPPortal("SAP NetWeaver
Portal").Frame("155922_FRAME").SAPButton("Find").Click 19,5
'need to make this dynamic won't always be Michigan Coating Products
Browser("SAP NetWeaver Portal").SAPPortal("SAP NetWeaver
Portal").Frame("155922_FRAME").Link("Michigan Coating Products").Click 107,5
Browser("SAP NetWeaver Portal").SAPPortal("SAP NetWeaver
Portal").Frame("155922_FRAME").SAPTreeView("Find").Select "Find"
Browser("SAP NetWeaver Portal").SAPPortal("SAP NetWeaver
Portal").Frame("145800_FRAME").SAPEdit("Purchase Order No.").Set a
Browser("SAP NetWeaver Portal").SAPPortal("SAP NetWeaver
Portal").Frame("145800_FRAME").SAPButton("Find").Click 20,4
Print("Need to execute script. Not blank and not equal to Dup") 'For
testing script
'Stuff
End If
DataTable.GetSheet("SOLNShippingData").SetNextRow
Next
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.