joeloyzaga Posted February 23, 2013 Author Share Posted February 23, 2013 oh geez - why didn't is see that - thx Link to comment Share on other sites More sharing options...
water Posted February 23, 2013 Share Posted February 23, 2013 Sometimes it needs two pairs of eyes My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
joeloyzaga Posted February 23, 2013 Author Share Posted February 23, 2013 I get this output while running this part of the code "_open("http://www.google.com")" - any hints? COM Error Number: 0x000000A9 ScriptLine: 5166 WinDescription: Description: Variable must be of type 'Object'. Source: COM Error Number: 0x000000A9 ScriptLine: 5172 WinDescription: Description: Variable must be of type 'Object'. Source: COM Error Number: 0x000000A9 ScriptLine: 5177 WinDescription: Description: Variable must be of type 'Object'. Source: Link to comment Share on other sites More sharing options...
water Posted February 23, 2013 Share Posted February 23, 2013 Don't see function _open in your code. Is it in some of your includes? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
joeloyzaga Posted February 23, 2013 Author Share Posted February 23, 2013 should be in the include sda.code.au3 Link to comment Share on other sites More sharing options...
water Posted February 24, 2013 Share Posted February 24, 2013 Without seeing the code it's not easy to help. It looks like you try to work with an object variable which doesn't point to an object. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
joeloyzaga Posted February 24, 2013 Author Share Posted February 24, 2013 I sent the code in my attachment - tried using the debugger and it didn't even get that far. any suggestions? Link to comment Share on other sites More sharing options...
joeloyzaga Posted February 25, 2013 Author Share Posted February 25, 2013 got this working opening a hard coded url but will make it all data driven now. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Outfile=C:\laptop apps\BlueDuck SDA 2.0\examples\readexcelnyworksheetname.a3x #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <../lib/sda.core.au3> #include <Excel.au3> #include <Array.au3> Global $aSheetData Global $sBrowser Global $iIndex $sBrowser = "iehta" Global $oExcel Global $aSheets Global $sSheet2Process Global $oTest $oExcel = _ExcelBookOpen("E:\datafiles\DOT\JLauto\Resources\DOT.xls") If @error Then Exit MsgBox(16, "Error", "_ExcelBookOpen returned error " & @error) $aSheets = _ExcelSheetList($oExcel) If @error Then Exit MsgBox(16, "Error", "_ExcelSheetList returned error " & @error) While 1 $sSheet2Process = InputBox("Prompt", "Please enter the name of the sheet to process", "") If @error = 1 Then ExitLoop ; Cancel was pressed _ExcelSheetActivate($oExcel, $sSheet2Process) ; Activate the sheet If @error Then MsgBox(16, "Error", "_ExcelSheetActivate returned error " & @error) Else $aSheetData = _ExcelReadSheetToArray($oExcel) ; Read the whole sheet into an array If @error Then MsgBox(16, "Error", "_ExcelSheetActivate returned error " & @error) Else _ProcessSheet($aSheetData) EndIf EndIf WEnd Func _ProcessSheet(ByRef $aSheetData) ; Process the data in the active sheet For $iRow = 3 To $aSheetData[0][0] For $iCol = 3 To $aSheetData[0][1] - 1 If $aSheetData[$iRow][$iCol] = "" then MsgBox(16, "nothing to process", $aSheetData[$iRow][$iCol],2) else ;MsgBox(0, "found something to process", $aSheetData[$iRow][$iCol],2) if StringInStr($aSheetData[$iRow][$iCol], "LaunchApp|") > 0 then msgbox(0,"Found a url to open",$aSheetData[$iRow][$iCol],2) Local $oTest,$oRepo ;New Test object $oTest = NewTest(@ScriptName) ;Start Test ;$oTest.Setup() ;Test Report create $oTest.Report.Create ;New Browser $oTest.NewBrowser($sBrowser,'http://es.altavista.com') $oTest.Browser.start ;Search in Altavista _open("/'") _windowMaximize() _waitForPageToLoad("3000") _type("//*[@id='yschsp']","BlueDuck SDA") _click("//*[@id='yschbt']") _waitForPageToLoad("3000") ;Check and add Steps Results If _isTextPresent("AutoIt driver for Selenium ") = 1 Then $oTest.AddStepResult("Step 1","Search",1) Else $oTest.AddStepResult("Step 2","Search",0) EndIf $oTest.Report.Close $oTest.Browser.stop endif EndIf Next Next EndFunc ;==>_ProcessSheet Func setUp() $oTest.NewBrowser('firefox','http://www.google.com/') $oTest.Browser.start _createReport(@ScriptName) ;Set the result report _construct($sBrowser ,"http://www.google.com/") _start() EndFunc Func tearDown() ;_reportClose() _stop() EndFunc _ExcelBookClose($oExcel) Link to comment Share on other sites More sharing options...
water Posted February 25, 2013 Share Posted February 25, 2013 All problems solved now? joeloyzaga 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
joeloyzaga Posted March 21, 2013 Author Share Posted March 21, 2013 yes!!!!!!!!!!!!!!!!!! thanks!!!!!!!!!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
water Posted March 21, 2013 Share Posted March 21, 2013 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now