Forum Discussion

lherry's avatar
lherry
Contributor
2 years ago

Enabling (or disabling) visualizer's auto-update frames during the run by script

Hi all,

I'd like to activate a project option by script : the "auto-update frames during the run" of the Visualizer.

Is it possible or is there any workaround to activate it (or an equivalent) dynamically?

Thanks for your help !

Loïc

3 Replies

  • hey, i took your code and then ran it, it seems to work on my end when i run the testexcel() function.

     

    from os import sys
    sys.path.insert(0, 'C:\\Users\\justin.kim\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\site-packages')
    import openpyxl
    
    def ExcelReadSingleCell(Sheet,Cell):
      excelPath = "C:\\Users\\justin.kim\\Desktop\\test.xlsx"
      wb = openpyxl.load_workbook(excelPath )
      ws = wb.get_sheet_by_name(Sheet)
      mycell=ws[Cell]
      return str(mycell.value)
    
      
      
      
    def testExcel():
      Log.Message(ExcelReadSingleCell("Sheet1", "D3"))
      Log.Message(ExcelReadSingleCell("Sheet1", "D4"))
      Log.Message(ExcelReadSingleCell("Sheet1", "D5"))
      Log.Message(ExcelReadSingleCell("Sheet1", "C3"))
      Log.Message(ExcelReadSingleCell("Sheet1", "C5"))

     

      

    I'd suggest filing for a support ticket, and the support engineers will guide you through using probably the report generator utility to take a look at your system and see if they can identify what the problem is with TestComplete when you are running your system. With that said, I have personally experience some problems too when using external libraries, like random closing of testcomplete. So to achieve this goal right now, I'd suggest looking into using the Sys.OleObject["Excel.Application"] object to interact with your spreadsheets.