Sie sind auf Seite 1von 5

''

''Environment.Value("url") = "http:\\www.flipkart.com"
''URL = Environment.Value("url")
''systemutil.Run "iexplore.exe",URL
''
'' Set Dbrowser=description.Create
'' Dbrowser("micclass").value="Browser"
'' Dbrowser("name").value="Online Shopping India.*"
''
'''Online Shopping India - Shop Online for Books, Mobile Phones, Digital Cameras
, Watches & More at Flipkart.com
''
''Set Dpage = description.Create
''Dpage("micclass").value="Page"
''Dpage("title").value ="Online Shopping India.*"
''
'''Laptops
''
''Set Dlink = description.Create
''Dlink("micclass").value= "Link"
''Dlink("html tag").value= "A"
''Dlink("text").value ="Laptops"
''
''
''Set obj = Browser(Dbrowser).Page(Dpage).ChildObjects(Dlink)
''
''Dim i
'''obj.Count value has the number of links in the page
''For i = 0 to obj.Count - 1
'' 'get the name of all the links in the page
'' x = obj(i).GetROProperty("innerhtml")
'' If x="Laptops" and i=1 Then
''
x = obj(i).Click
''
Exit for
'' End If
''' print x
''Next
''
''
''msgbox "hi"
''
''
''
'' Set Dbrowser=description.Create
'' Dbrowser("micclass").value="Browser"
'' Dbrowser("name").value="Laptops Store Online.*"
''
'''Online Shopping India - Shop Online for Books, Mobile Phones, Digital Cameras
, Watches & More at Flipkart.com
''
''Set Dpage = description.Create
''Dpage("micclass").value="Page"
''Dpage("title").value ="Laptops Store Online.*"
''
'''Laptops
''
''Set Dlink = description.Create
''Dlink("micclass").value= "Link"
''Dlink("html tag").value= "A"

''Dlink("text").value ="HP"
''
''
''Set obj = Browser(Dbrowser).Page(Dpage).ChildObjects(Dlink)
''msgbox obj.Count
''Dim j
'''obj.Count value has the number of links in the page
''For j = 0 to obj.Count - 1
'' 'get the name of all the links in the page
'' x = obj(j).GetROProperty("innerhtml")
''
''
If x="HP" and j=1Then
''
x = obj(j).highlight
''
x = obj(j).Click
''
Exit for
'' End If
'' ' x = obj(i).Click
''' print x
''Next
''
''msgbox "hi"
''
'''HP Laptops.*
''
'''
''' Set Dbrowser=description.Create
''' Dbrowser("micclass").value="Browser"
''' Dbrowser("name").value="HP Laptops.*"
'''
''''Online Shopping India - Shop Online for Books, Mobile Phones, Digital Camera
s, Watches & More at Flipkart.com
'''
'''Set Dpage = description.Create
'''Dpage("micclass").value="Page"
'''Dpage("title").value ="HP Laptops.*"
'''
''''Laptops
'''
'''Set Dlink = description.Create
'''Dlink("micclass").value= "Link"
'''Dlink("html tag").value= "A"
'''Dlink("text").value ="HP"
'''
'''
'''Set obj = Browser(Dbrowser).Page(Dpage).ChildObjects(Dlink)
'''msgbox obj.Count
'''Dim j
''''obj.Count value has the number of links in the page
'''For j = 0 to obj.Count - 1
''' 'get the name of all the links in the page
''' x = obj(j).GetROProperty("innerhtml")
'''
'''
If x="HP" Then
'''
x = obj(j).highlight
'''
x = obj(j).Click
''' End If
''' ' x = obj(i).Click
'''' print x
'''Next
'''

'''
''
''
''
''
''
'
'
'
'
''Create a new Microsoft Excel object
'Set myxl = createobject("excel.application")
'
''To make Excel visible
'myxl.Application.Visible = true
'
''myxl.Workbooks.Add
''wait 2
''
'''Save the Excel file as qtp.xls
''myxl.ActiveWorkbook.SaveAs "D:\flip.xls"
''
'''close Excel
''myxl.Application.Quit
''
''Set myxl=nothing
'
'XYZ = "dsgfjh47214$#%"
'Set reg=New RegExp
'Set reg1=New RegExp
'Set reg2=New RegExp
'
'reg.pattern = "[a-z]+"
'reg1.pattern = "[0-9]+"
'reg2.pattern = "[\$]|[\#]|[\%]"
'
'reg.global = True
'reg1.global = True
'reg2.global = True
'reg. ignorecase = True
'
'
'If reg.test(XYZ) and reg1.test(XYZ) and reg2.test(XYZ)Then
'
Set c=reg.execute(XYZ)
'
Set e=reg1.execute(XYZ)
'
Set g=reg2.execute(XYZ)
'
'
For each d in c
'
print d
'
Next
'
For each f in e
'
print f
'
Next
'
For each h in g
'
y=y&h
'
Next
'
print y
'End If
'Rs. 30001 - Rs. 40000

Set Dbrowser=description.Create
Dbrowser("micclass").value="Browser"
Dbrowser("name").value="HP Laptops.*"
'Online Shopping India - Shop Online for Books, Mobile Phones, Digital Cameras,
Watches & More at Flipkart.com
Set Dpage = description.Create
Dpage("micclass").value="Page"
Dpage("title").value ="HP Laptops.*"
Set Dwe = description.Create
Dwe("micclass").value="Webelement"
Dwe("abs_x").Value = "250"
Dwe("abs_y").Value = "488"
'Dwe("innertext").value = "Rs. 30001 - Rs. 40000"
Set Webchk = description.Create
Webchk("micclass").value = "Webcheckbox"

Set va=Browser(Dbrowser).page(Dpage).ChildObjects(Webchk)
value1 = va.count
msgbox value1

For int1=0 to value1-1


price = va(int1).getroproperty("value")
if instr(1,price,"Rs.+30001+-+Rs.+40000") Then
va(int1).set"ON"
Exit for
End If
Next

'Dim t
'
''
'
'
'
'

For t=0 to value1-1 step 1


va(t).highlight
bal =va(t).GetroProperty("innertext")
print bal
If bal = "Rs. 30001 - Rs. 40000" Then
va(t).highlight

'
'
'

End If
Next

Das könnte Ihnen auch gefallen