Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Page Timing Issue
#1
Greetings,

I am having bit of a trouble with managing the timing between each web page loading.
I want an html element clicked immediately after the web page is fully loaded.
I tried replacing between WC and WV but in vain.
I do not want to use a fixed wait period, as each page varies in load time.
I am also bit confused about:
Macro Macro1
Code:
Copy      Help
wait 0 I
web "http://" MakeInt(1 50)
I mean, how do I use the above in my order update page?
The entire code is pasted here. Kindly advise:
1) How best to manage web page load time without using a separate wait command.
2) How the overall code can be improved/optimized.

Macro VISTA Order Amends - L405
Code:
Copy      Help
;---- Recorded 29-Oct-13 6:06:04 PM ----
opt slowkeys 0; opt slowmouse 0; spe 40

rep 100
,int w1=act(win("Microsoft Excel - " "XLMAIN"))
,'D    ;; Down Ctrl+C
,;get selected cells in Excel
,ExcelSheet es.Init
,ARRAY(str) factoryOrderNum
,es.CellsToArray(factoryOrderNum "sel")
,'T;
,ARRAY(str) extColourTemp
,es.CellsToArray(extColourTemp "sel")
,str extColour = extColourTemp
,extColourTemp.redim
,'T;
,ARRAY(str) trimColourTmp
,es.CellsToArray(trimColourTmp "sel")
,str trimColour=trimColourTmp
,trimColourTmp.redim
,'T;
,ARRAY(str) veneerTmp
,es.CellsToArray(veneerTmp "sel")
,str veneer=veneerTmp
,veneerTmp.redim
,'TT;
,ARRAY(str) wheelTmp
,es.CellsToArray(wheelTmp "sel")
,str wheel=wheelTmp
,wheelTmp.redim
,'T;
,ARRAY(str) roofTmp
,es.CellsToArray(roofTmp "sel")
,str roof=roofTmp
,roofTmp.redim
,'T;
,ARRAY(str) sideVentsTmp
,es.CellsToArray(sideVentsTmp "sel")
,str sideVents=sideVentsTmp
,sideVentsTmp.redim
,'T;
,ARRAY(str) towBarTmp
,es.CellsToArray(towBarTmp "sel")
,str towBar=towBarTmp
,towBarTmp.redim
,'T;
,ARRAY(str) rearEntTmp
,es.CellsToArray(rearEntTmp "sel")
,str rearEnt=rearEntTmp
,rearEntTmp.redim
,'T;
,ARRAY(str) seatTmp
,es.CellsToArray(seatTmp "sel")
,str seat=seatTmp
,seatTmp.redim
,'T;
,ARRAY(str) rearCoolerTmp
,es.CellsToArray(rearCoolerTmp "sel")
,str rearCooler=rearCoolerTmp
,rearCoolerTmp.redim
,'T;
,ARRAY(str) cruiseControlTmp
,es.CellsToArray(cruiseControlTmp "sel")
,str cruiseControl=cruiseControlTmp
,cruiseControlTmp.redim
,'T;
,ARRAY(str) steeringTmp
,es.CellsToArray(steeringTmp "sel")
,str steering=steeringTmp
,steeringTmp.redim
,'T;
,ARRAY(str) soundSystemTmp
,es.CellsToArray(soundSystemTmp "sel")
,str soundSystem=soundSystemTmp
,soundSystemTmp.redim
,'T;
,ARRAY(str) cameraTmp
,es.CellsToArray(cameraTmp "sel")
,str camera=cameraTmp
,cameraTmp.redim
,'T;
,ARRAY(str) darkAtlasTmp
,es.CellsToArray(darkAtlasTmp "sel")
,str darkAtlas=darkAtlasTmp
,darkAtlasTmp.redim
,'T;
,ARRAY(str) touchScreenTmp
,es.CellsToArray(touchScreenTmp "sel")
,str touchScreen=touchScreenTmp
,touchScreenTmp.redim
,'T;
,ARRAY(str) parkAssistTmp
,es.CellsToArray(parkAssistTmp "sel")
,str parkAssist=parkAssistTmp
,parkAssistTmp.redim
,'T;
,ARRAY(str) moodLightTmp
,es.CellsToArray(moodLightTmp "sel")
,str moodLight=moodLightTmp
,moodLightTmp.redim
,'T;
,ARRAY(str) activeRearDiffTmp
,es.CellsToArray(activeRearDiffTmp "sel")
,str activeRearDiff=activeRearDiffTmp
,activeRearDiffTmp.redim
,'T;
,ARRAY(str) blackPack226Tmp
,es.CellsToArray(blackPack226Tmp "sel")
,str blackPack226=blackPack226Tmp
,blackPack226Tmp.redim
,'T;
,ARRAY(str) tvReceiverTmp
,es.CellsToArray(tvReceiverTmp "sel")
,str tvReceiver=tvReceiverTmp
,tvReceiverTmp.redim
,'T;
,ARRAY(str) illumTreadstripsTmp
,es.CellsToArray(illumTreadstripsTmp "sel")
,str illumTreadstrips=illumTreadstripsTmp
,illumTreadstripsTmp.redim
,'T;
,ARRAY(str) rearCenterConsoleCoolerTmp
,es.CellsToArray(rearCenterConsoleCoolerTmp "sel")
,str rearCenterConsoleCooler=rearCenterConsoleCoolerTmp
,rearCenterConsoleCoolerTmp.redim
,
,
,
,;opt slowkeys 1
,;wait 3
,
,;Insert factory order number in website field
,int w=wait(100 WV win("Find Orders - Windows Internet Explorer" "IEFrame"))
,act w
,Htm e=htm("INPUT" "fromValue" "" w "0" 28 0x121 3)
,e.SetText(factoryOrderNum)
,factoryOrderNum.redim
,;Click Search Button
,Htm e1=htm("NOBR" "Search" "" w "0" 20 0x21 3)
,e1.Click
,
,;wait 1
,;Click Maintain Orders button
,int w2=wait(100 WV win("View Order - Windows Internet Explorer" "IEFrame"))
,Htm e2=htm("NOBR" "Maintain Order " "" w2 "0" 7 0x21 3)
,e2.Click
,
,
,;Click Configurator button
,wait 2
,
,int w3=wait(100 WV win("Maintain Order - Windows Internet Explorer" "IEFrame"))
,Htm e3=htm("NOBR" "Configurator " "" w3 "0" 2 0x21 3)
,wait 1
,e3.Click
,err ;;handles the error
,,mes F"After Configurator Button {_error.line}"
,
,;MES m
,;m.style="O"
,;m.x=100
,;m.y=100
,;m.timeout=3
,;m.default='O'
,;;;;;checking variable content and changing website values accordingly
,
,wait 3
,int w4=wait(100 WV win("Vehicle Configuration - Windows Internet Explorer" "IEFrame"))
,;changing exterior colour
,;wait 2
,
,Htm e4=htm("SELECT" "sel3" "" w4 "0" 8 0x121 3)
,
,;mes "entering exterior"
,
,if extColour = "Santorini Black"
,,e4.CbSelect("820 Santorini Black")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Nara Bronze"
,,e4.CbSelect("825 Nara Bronze")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Aleutian Silver"
,,e4.CbSelect("835 Aleutian Silver")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Mariana Black"
,,e4.CbSelect("860 Mariana Black")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Barolo Black"
,,e4.CbSelect("861 Barolo Black")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Indus Silver"
,,e4.CbSelect("863 Indus Silver")
,,;mes F"Colour{extColour} is chosen" ""
,,wait 2
,else if extColour = "Havana"
,,e4.CbSelect("865 Havana")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Aintree Green"
,,e4.CbSelect("866 Aintree Green")
,,;mes F"Colour{extColour} is chosen" ""
,,wait 2
,else if extColour = "Fuji White"
,,e4.CbSelect("867 Fuji White")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Firenze Red"
,,e4.CbSelect("868 Firenze Red")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Luxor"
,,e4.CbSelect("869 Luxor")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Barossa"
,,e4.CbSelect("871 Barossa")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Corris Grey"
,,e4.CbSelect("873 Corris Grey")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Loire Blue"
,,e4.CbSelect("942 Loire Blue")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Scotia Grey"
,,e4.CbSelect("943 Scotia Grey")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Causeway Grey"
,,e4.CbSelect("950 Causeway Grey")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Aruba"
,,e4.CbSelect("995 Aruba")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,else if extColour = "Kaikoura Stone"
,,e4.CbSelect("997 Kaikoura Stone")
,,;mes F"Colour {extColour} is chosen" ""
,,wait 2
,
,
,;changing trim
,wait 2
,
,
,Htm e5=htm("SELECT" "sel4" "" w4 "0" 9 0x121 3)
,wait 5
,;mes "entering interior"
,if trimColour = "Ebony Seat Ebony/Ebony Cirrus"
,,e5.CbSelect("TKA Ebony Seats Ebony/Ebony Cirrus")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ebony Seat Ebony/Ebony Ebony"
,,e5.CbSelect("TKB Ebony Seats Ebony/Ebony Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Almond Seat Espresso/Almond Ivory"
,,e5.CbSelect("TKC Almond Seats Espresso/Almond Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Cirus Seats Ebony/Cirrus Cirrus" ;;Cirus Spelling in AL
,,e5.CbSelect("TKE Cirrus Seats Ebony/Cirrus Cirrus")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Cirus Seats Ebony/Cirrus Ebony"  ;;Cirus Spelling in AL
,,e5.CbSelect("TKF Cirrus Seats Ebony/Cirrus Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ebony Seat Ebony/Cirrus Cirrus"
,,e5.CbSelect("TKG Ebony Seats Ebony/Cirrus Cirrus")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ebony Seat Ebony/Cirrus Ebony"
,,e5.CbSelect("TKH Ebony Seats Ebony/Cirrus Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ivory Seat Ebony/Ivory Ivory"
,,e5.CbSelect("TKK Ivory Seats Ebony/Ivory Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ivory Seat Ebony/Ivory Ebony"
,,e5.CbSelect("TKL IvorySeats Ebony/Ivory Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ebony Seat Ebony/Ivory Ivory"
,,e5.CbSelect("TKM Ebony Seats Ebony/Ivory Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ebony Seat Ebony/Ivory Ebony"
,,e5.CbSelect("TKN Ebony Seats Ebony/Ivory Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Tan Seat Ebony/Tan Ivory"
,,e5.CbSelect("TKQ Tan Seats Ebony/Tan Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Tan Seat Ebony/Tan Ebony"
,,e5.CbSelect("TKR Tan Seats Ebony/Tan Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Tan Seat Ebony/Ebony Ebony"
,,e5.CbSelect("TOJ Tan Seats, Ebony/Ebony, Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Tan Seat Espresso/Tan Ivory"
,,e5.CbSelect("TOD Tan seats espresso/tan int/Ivory hline")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ivory Seat Cherry/Ivory Ivory"
,,e5.CbSelect("TKS Ivory Seats Cherry/Ivory Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Cherry Seat Cherry/Ivory Ivory"
,,e5.CbSelect("TKT Cherry Seats Cherry/Ivoy Ivory") ;;Ivory - Ivoy in VISTA website
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Pimento Seat Ebony/Pimento Ivory"
,,e5.CbSelect("TKW Pimento Seats Ebony/Pimento Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Pimento Seat Ebony/Pimento Ebony"
,,e5.CbSelect("TKX Pimento Seats Ebony/Pimento Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Pimento Seat Ebony/Ebony Ebony"
,,e5.CbSelect("TOL Pimento Seats, Ebony/Ebony, Ebony")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Espresso Seat Espresso/Almond Ivory"
,,e5.CbSelect("TKD Espresso Seats Espresso/Almond Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ivory Seat Espresso/Ivory Ivory"
,,e5.CbSelect("TKI Ivory Seats Espresso/Ivory Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Espresso Seat Espresso/Ivory Ivory"
,,e5.CbSelect("TKJ Espresso Seats Espresso/Ivory Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Navy Seat Navy/Cirrus Cirrus"
,,e5.CbSelect("TKO Navy Seats Navy/Cirrus Cirrus")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Cirrus Seat Navy/Cirrus Cirrus"
,,e5.CbSelect("TKP Cirrus Seats Ebony/Cirrus Cirrus")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Ivory Seat Brogue/Ivory Ivory"
,,e5.CbSelect("TKU Ivory Seats Brogue/Ivory Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,,goto changeVeneer
,else if trimColour = "Brogue Seat Brogue/Ivory Ivory"
,,e5.CbSelect("TKV Brogue Seats Brogue/Ivory Ivory")
,,;mes F"Trim {trimColour} is chosen" ""
,,wait 2
,
,err+ ;;handles the error
,,mes F"After Trim {_error.line}"
,,
,str varTemp1 varTemp2 varTemp3 varTemp4 varTemp5 varTemp6 varTemp7 varTemp8
,
,;changeVeneer
,wait 1
,;mes "entering veneer"
,
,if veneer="Grand Black Wood"
,,Acc a1.Find(w4 "TEXT" "  088EH Grand Black Wood (12) " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,wait 2
,,varTemp1=a1.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a1.DoDefaultAction
,,,;mes F"Venner {veneer} is chosen" ""
,,,wait 2
,,,goto changingAlloyWheels
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Venner {veneer} already chosen" ""
,,,;wait 2
,,,goto changingAlloyWheels
,
,err+ ;;handles the error
,,mes F"After Grand Black Wood Veneer {_error.line}"
,
,if veneer="Shadow Walnut Veneer"
,,Acc a2.Find(w4 "TEXT" "  088HF Shadow Walnut Veneer " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,wait 2
,,varTemp2=a2.WebAttribute("src")
,,if matchw(varTemp2 "*+config-selected.gif")=0
,,,a2.DoDefaultAction
,,,;mes F"Venner {veneer} is chosen" ""
,,,wait 2
,,,goto changingAlloyWheels
,,else if matchw(varTemp2 "*+config-selected.gif")=1
,,,;mes F"Veneer {veneer} already chosen" ""
,,,;wait 2
,,,goto changingAlloyWheels
,
,err+ ;;handles the error
,,mes F"After Shadow Walnut Veneer Veneer {_error.line}"
,
,if veneer="Grey Oak"
,,Acc a3.Find(w4 "TEXT" "  088HY Grey Oak " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,wait 2
,,varTemp3=a3.WebAttribute("src")
,,if matchw(varTemp3 "*+config-selected.gif")=0
,,,a3.DoDefaultAction
,,,wait 2
,,,goto changingAlloyWheels
,,else if matchw(varTemp3 "*+config-selected.gif")=1
,,,;mes F"Veneer {veneer} already chosen" ""
,,,;wait 2
,,,goto changingAlloyWheels
,
,err+ ;;handles the error
,,mes F"After Grey Oak Veneer {_error.line}"
,
,;mes "entering complicated veneer"
,
,if veneer="Ebony Macassar"
,,Acc a51.Find(w4 "TEXT" "  088EH Grand Black Wood (12) " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,err+ goto veneerNext2
,,varTemp1=a51.WebAttribute("src")
,,;veneerNext2
,,Acc a52.Find(w4 "TEXT" "  088HF Shadow Walnut Veneer " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,err+ goto veneerNext3
,,varTemp2=a52.WebAttribute("src")
,,;veneerNext3
,,Acc a53.Find(w4 "TEXT" "  088HY Grey Oak " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,err+ goto veneerNext4
,,,varTemp3=a53.WebAttribute("src")
,,;veneerNext4
,,,if matchw(varTemp1 "*+config-selected.gif")=1
,,,,a51.DoDefaultAction
,,,,;mes varTemp1
,,,,wait 2
,,,,goto changingAlloyWheels
,,,if matchw(varTemp2 "*+config-selected.gif")=1
,,,,a52.DoDefaultAction
,,,,;mes varTemp2
,,,,wait 2
,,,,goto changingAlloyWheels
,,,if matchw(varTemp3 "*+config-selected.gif")=1
,,,,a53.DoDefaultAction
,,,,;mes varTemp3
,,,,wait 2
,,,,goto changingAlloyWheels
,,,;mes F"Veneer {veneer} is chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes F"After Ebony Macassar {_error.line}"
,
,
,;changingAlloyWheels
,veneer.all
,;wait 2
,;mes "entering wheels"
,
,if wheel="20 Style 2"
,,Acc a7.Find(w4 "TEXT" "  029SB 20 inch 5 Split Spoke Style 2 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a7.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a7.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,;wait 2
,,,goto changeContrastRoof
,,
,err+ ;;handles the error
,,mes _error.line
,
,if wheel="20 Style 3"
,,Acc a8.Find(w4 "TEXT" "  029SC 20 inch 5 Split Spoke Shadow Chrome Finish Style 3 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp2=a8.WebAttribute("src")
,,if matchw(varTemp2 "*+config-selected.gif")=0
,,,a8.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp2 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,;wait 2
,,,goto changeContrastRoof
,
,err+ ;;handles the error
,,mes _error.line
,
,if wheel="21 Style 4"
,,Acc a9.Find(w4 "TEXT" "  029SD 21'' Alloy Delta Wing Sparkle Silver (D) " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp3=a9.WebAttribute("src")
,,if matchw(varTemp3 "*+config-selected.gif")=0
,,,a9.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp3 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,;wait 2
,,,goto changeContrastRoof
,
,err+ ;;handles the error
,,mes _error.line
,
,if wheel="21 Style 5"
,,Acc a10.Find(w4 "TEXT" "  029SE 21'' Alloy Delta Wing Diamond Turned (E) " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp4=a10.WebAttribute("src")
,,if matchw(varTemp4 "*+config-selected.gif")=0
,,,a10.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp4 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,;wait 2
,,,goto changeContrastRoof
,
,err+ ;;handles the error
,,mes _error.line
,
,if wheel="22 Style 6"
,,Acc a11.Find(w4 "TEXT" "  029SF 22'' Alloy Sparkle Silver (F) " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp5=a11.WebAttribute("src")
,,if matchw(varTemp5 "*+config-selected.gif")=0
,,,a11.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp5 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,;wait 2
,,,goto changeContrastRoof
,
,err+ ;;handles the error
,,mes _error.line
,
,if wheel="22 Style 7"
,,Acc a12.Find(w4 "TEXT" "  029SG 22 inch 7 Split Spoke Diamond Turned Finish Style 7 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp6=a12.WebAttribute("src")
,,if matchw(varTemp6 "*+config-selected.gif")=0
,,,a12.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,;wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp6 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,
,err+ ;;handles the error
,,mes _error.line
,
,if wheel="22 Style 9"
,,Acc a13.Find(w4 "TEXT" "  029SH 22 inch 6 Spoke Diamond Turned Finish Style 9 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp7=a13.WebAttribute("src")
,,if matchw(varTemp7 "*+config-selected.gif")=0
,,,a13.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp7 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,;wait 2
,,,goto changeContrastRoof
,
,err+ ;;handles the error
,,mes _error.line
,
,if wheel="22 Style 8"
,,Acc a14.Find(w4 "TEXT" "  029SK 22 inch 7 Spoke Style 8 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp8=a14.WebAttribute("src")
,,if matchw(varTemp8 "*+config-selected.gif")=0
,,,a14.DoDefaultAction
,,,;mes F"Wheels {wheel} is chosen" ""
,,,wait 2
,,,goto changeContrastRoof
,,else if matchw(varTemp8 "*+config-selected.gif")=1
,,,;mes F"Wheels {wheel} already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;changeContrastRoof
,;wait 2
,;mes "entering Roof"
,
,if roof="Indus Silver"
,,Acc a4.Find(w4 "TEXT" "  080AD Silver Roof " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a4.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a4.DoDefaultAction
,,,;mes F"Roof colour {roof} is chosen" ""
,,,wait 2
,,,goto chooseAtlasSideVents
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Roof colour {roof} already chosen" ""
,,,;wait 2
,,,goto chooseAtlasSideVents
,
,err+ ;;handles the error
,,mes _error.line
,
,if roof="Santorini Black"
,,Acc a5.Find(w4 "TEXT" "  080AN Black Roof " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp2=a5.WebAttribute("src")
,,if matchw(varTemp2 "*+config-selected.gif")=0
,,,a5.DoDefaultAction
,,,;mes F"Roof colour {roof} is chosen" ""
,,,wait 2
,,,goto chooseAtlasSideVents
,,else if matchw(varTemp2 "*+config-selected.gif")=1
,,,;mes F"Roof colour {roof} already chosen" ""
,,,;wait 2
,,,goto chooseAtlasSideVents
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;chooseAtlasSideVents
,
,;wait 2
,;mes "entering side vents"
,
,if sideVents="Yes"
,,Acc a6.Find(w4 "TEXT" "  080XH Side Vents - Atlas " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a6.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a6.DoDefaultAction
,,,;mes F"Atlas Side Vents is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Atlas Side Vents already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;chooseDeployableTowbar
,;wait 2
,;mes "entering towbar"
,
,if towBar="Yes"
,,Acc a24.Find(w4 "TEXT" "  028EJ Electric Deployable Towbar " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a24.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a24.DoDefaultAction
,,,;mes F"Electric Deployable Tow Bar is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Electric Deployable Tow Bar already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,
,;changing rear entertainment
,;wait 2
,;mes "entering entertainment"
,
,if rearEnt="Yes"
,,Acc a22.Find(w4 "TEXT" "  129AH Rear Seat Entertainment " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a22.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a22.DoDefaultAction
,,,;mes F"Rear Seat Entertainment is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Rear Seat Entertainment already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;changing seat
,;wait 2
,;mes "entering Seat Style"
,
,if seat="Style 19"
,,Acc a15.Find(w4 "TEXT" "  033SG Semi Aniline Leather Seat Style 19 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a15.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a15.DoDefaultAction
,,,;mes F"Seat {seat} is chosen" ""
,,,wait 2
,,,goto chooseRearCooler
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Seat {seat} already chosen" ""
,,,;wait 2
,,,goto chooseRearCooler
,
,err+ ;;handles the error
,,mes _error.line
,,
,if seat="Style 24"
,,Acc a94.Find(w4 "TEXT" "  033TL Semi/Aniline Leather Seat Style 24 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a94.WebAttribute("src")
,,if matchw(varTemp2 "*+config-selected.gif")=0
,,,a94.DoDefaultAction
,,,;mes F"Seat {seat} is chosen" ""
,,,wait 2
,,,goto chooseRearCooler
,,else if matchw(varTemp2 "*+config-selected.gif")=1
,,,;mes F"Seat {seat} already chosen" ""
,,,;wait 2
,,,goto chooseRearCooler
,
,err+ ;;handles the error
,,mes _error.line
,
,if seat="Style 21"
,,Acc a16.Find(w4 "TEXT" "  033SP Semi Aniline/Rear Exec Seat Style 21 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp2=a16.WebAttribute("src")
,,if matchw(varTemp3 "*+config-selected.gif")=0
,,,a16.DoDefaultAction
,,,;mes F"Seat {seat} is chosen" ""
,,,wait 2
,,,goto chooseRearCooler
,,else if matchw(varTemp3 "*+config-selected.gif")=1
,,,;mes F"Seat {seat} already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;chooseRearCooler
,
,;chooseCruiseControl
,;wait 2
,;mes "entering cruise control"
,
,if cruiseControl="Yes"
,,Acc a23.Find(w4 "TEXT" "  065AG Adaptive Cruise Control and queue assist " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a23.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a23.DoDefaultAction
,,,;mes F"Adaptive Cruise Control is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Adaptive Cruise Control already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;changing steering
,;wait 2
,;mes "entering steering wheel"
,
,if steering="Yes"
,,Acc a17.Find(w4 "TEXT" "  032DR Wood/Leather Steering Wheel " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a17.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a17.DoDefaultAction
,,,;mes F"Wood Leather Steering is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Wood Leather Steering already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,;changing sound system
,;wait 2
,;mes "entering sound system"
,
,if soundSystem="1700 W"
,,Acc a27.Find(w4 "TEXT" "  025LV Super Premium System " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a27.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a27.DoDefaultAction
,,,;mes F"Super Premium Sound System is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Super Premium Sound System already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes F"After Sound System {_error.line}"
,
,if soundSystem="825 W"
,,Acc a99.Find(w4 "TEXT" "  025LN Premium Audio System " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a99.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a99.DoDefaultAction
,,,;mes F"Super Premium Sound System is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Super Premium Sound System already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes F"After Sound System {_error.line}"
,
,
,;changingDarkAtlas
,;wait 2
,;mes "entering Dark Atlas"
,
,if darkAtlas="Pack 1"
,,Acc a25.Find(w4 "TEXT" "  074LX Exterior Pack - 1 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a25.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a25.DoDefaultAction
,,,;mes F"Dark Atlas Pack 1 is chosen" ""
,,,wait 2
,,,goto changingDualViewTouchscreen
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Dark Atlas Pack 1 already chosen" ""
,,,;wait 2
,,,goto changingDualViewTouchscreen
,
,err+ ;;handles the error
,,mes _error.line
,
,if darkAtlas="Pack 2"
,,Acc a26.Find(w4 "TEXT" "  074LY Exterior Pack - 2 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp2=a26.WebAttribute("src")
,,if matchw(varTemp2 "*+config-selected.gif")=0
,,,a26.DoDefaultAction
,,,;mes F"Dark Atlas Pack 2 is chosen" ""
,,,wait 2
,,,goto changingDualViewTouchscreen
,,else if matchw(varTemp2 "*+config-selected.gif")=1
,,,;mes F"Dark Atlas Pack 2 already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,;if seat="Pack 3"
,,;Acc a16.Find(w4 "TEXT" "  033SP Semi Aniline/Rear Exec Seat Style 21 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,;varTemp2=a16.WebAttribute("src")
,,;if matchw(varTemp2 "*+config-selected.gif")=0
,,,;a16.DoDefaultAction
,,,;mes F"Seat {seat} is chosen" ""
,,,;wait 2
,,,;goto chooseRearCooler
,,;else if matchw(varTemp2 "*+config-selected.gif")=1
,,,;mes F"Seat {seat} already chosen" ""
,,,;wait 2
,;
,;err+ ;;handles the error
,,;mes _error.line

,;changingDualViewTouchscreen
,;wait 2
,;mes "entering Touchscreen"
,
,if touchScreen="Yes"
,,Acc a21.Find(w4 "TEXT" "  087AM Dual View Touchscreen " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a21.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a21.DoDefaultAction
,,,;mes F"Dual Touch Screen is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Dual Touch Screen already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,;changingSurroundCamera
,;wait 2
,;mes "entering surround camera"
,
,if camera="Yes"
,,Acc a28.Find(w4 "TEXT" "  086GC Surround Camera System " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a28.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a28.DoDefaultAction
,,,;mes F"Surround Camera is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Surround Camera already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,;changing park asist
,;wait 2
,;mes "entering park assist"
,
,if parkAssist="Yes"
,,Acc a18.Find(w4 "TEXT" "  086GZ Park Assist " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a18.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a18.DoDefaultAction
,,,;mes F"Park Assist is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Park Assist already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,;Interior Mood Lighting 3
,;wait 2
,;mes "entering mood light"
,
,if moodLight="Yes"
,,Acc a95.Find(w4 "TEXT" "  064FC Ambience Lighting - 3 " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a95.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a95.DoDefaultAction
,,,;mes F"Park Assist is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Park Assist already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,;Active Rear Locking Differential
,;wait 2
,;mes "entering rear lock diff"
,
,if activeRearDiff="Yes"
,,Acc a96.Find(w4 "TEXT" "  027DB Active Rear Locking Diff " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,varTemp1=a96.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a96.DoDefaultAction
,,,;mes F"Park Assist is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Park Assist already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;Black Pack
,;wait 2
,;mes "entering black pack"
,
,if blackPack226="Yes"
,,Acc a97.Find(w4 "TEXT" "  074LN Black Pack " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,wait 2
,,varTemp1=a97.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a97.DoDefaultAction
,,,;mes F"Park Assist is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Park Assist already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,
,;Digital Analogue TV Receiver
,;wait 2
,;mes "entering TV Receiver"
,
,if tvReceiver="Yes"
,,Acc a98.Find(w4 "TEXT" "  129AI Digital / Analogue Television receiver " "state=0x40 0x20000040" 0x3015 3 0 "parent previous first2")
,,wait 2
,,varTemp1=a98.WebAttribute("src")
,,if matchw(varTemp1 "*+config-selected.gif")=0
,,,a98.DoDefaultAction
,,,;mes F"Park Assist is chosen" ""
,,,wait 2
,,else if matchw(varTemp1 "*+config-selected.gif")=1
,,,;mes F"Park Assist already chosen" ""
,,,;wait 2
,
,err+ ;;handles the error
,,mes _error.line
,
,;mes "Done with options"
,
,;Kill variables
,varTemp1.all
,varTemp2.all
,varTemp3.all
,varTemp4.all
,varTemp5.all
,varTemp6.all
,varTemp7.all
,varTemp8.all
,extColour.all
,trimColour.all
,veneer.all
,wheel.all
,roof.all
,sideVents.all
,towBar.all
,rearEnt.all
,seat.all
,rearCooler.all
,cruiseControl.all
,steering.all
,soundSystem.all
,camera.all
,darkAtlas.all
,touchScreen.all
,parkAssist.all
,
,wait 2
,;click ok button
,Htm e20=htm("NOBR" "OK " "" w4 "0" 5 0x21 3)
,e20.Click
,,;errore20
,err+ ;;handles error if web page error occurs or if there is no change in order.
,,mes "Unable to obtain 'OK' button.[]Please note the error and click 'Ok' to return to search page."
,,;Htm e25=htm("NOBR" "Return To Search " "" w4 "0" 2 0x21 3)
,,;e25.Click
,,goto errorHere
,
,wait 1
,;Activate windows, mark current executed record in yellow colour and save file.
,act w1
,'L(#24)   ;; Left(*20)
,lef 301 105 w1 1 ;;property page 'Ribbon', split button 'Shading'
,es.Save
,
,;Activate VISTA website, confirm amendments and return to search page.
,act w4
,
,;if(mes("Go Ahead?" "" "OC")!='O') ret
,
,
,wait 1
,;click get date button
,int w5=wait(100 WV win("Maintain Order - Windows Internet Explorer" "IEFrame"))
,Htm e21=htm("NOBR" "Get Date" "" w5 "0" 4 0x21 3)
,e21.Click
,err+ goto confirm
,
,wait 7
,;confirm
,;click confirm button
,int w6=wait(100 WV win("Maintain Order - Windows Internet Explorer" "IEFrame"))
,Htm e22=htm("NOBR" "Confirm" "" w6 "0" 4 0x21 3)
,e22.Click
,err+ goto errorHere
,
,wait 5
,;click return to search button
,int w7=wait(100 WV win("View Order - Windows Internet Explorer" "IEFrame"))
,Htm e24=htm("NOBR" "Return To Search " "" w7 "0" 2 0x21 3)
,e24.Click
,wait 5
,int w8=wait(100 WV win("Find Orders - Windows Internet Explorer" "IEFrame"))
,Htm e6=htm("INPUT" "fromValue" "" w8 "0" 28 0x121 3)
,e6.SetText("")
,;wait 5
,act w1
,goto ofline
,
,;errorHere
,;;handles error if web page error occurs or if there is no change in order.
,;mes "Unable to obtain 'Get Date'.[]Please note the error and click 'Ok' to return to search page."
,Htm e23=htm("NOBR" "Return To Search " "" w5 "0" 2 0x21 3)
,e23.Click
,int w9=wait(100 WV win("Find Orders - Windows Internet Explorer" "IEFrame"))
,Htm e7=htm("INPUT" "fromValue" "" w9 "0" 28 0x121 3)
,e7.SetText("")
,;wait 5
,act w1
,;mes "2nd here"
,;goto letsBeginhere
,
,;ofline
,wait 0.25
opt slowkeys 0; opt slowmouse 0; spe -1
;---------------------------------------
Best Regards,
Philip
#2
Hi Friends,

Is there anyone in this forum who can answer this query...

Haven't seen Gintaras online for a while too...
Is everything all right?
Best Regards,
Philip
#3
QM supports 3 types of waiting until web page loaded.
1. wait 0 I and web ..., like in your post. Both wait while web browser is busy (or it says that it is busy).
2. Wait for a window with certain title (wait 0 WV), or wait until window title changes (wait 0 WT).
3. Search for an accessible object or html element in the web page, and specify a wait time.

For all 3 there are dialogs to create code.


Forum Jump:


Users browsing this thread: 4 Guest(s)