← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #197689]: unable to configure sikuli in eclipse IDE

 

Question #197689 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/197689

    Status: Solved => Open

Ram is still having a problem:
click( )
click( )
import xlrd,os
def Open_ExcelFile(Filepath):
	ExcelWorkBookObject = xlrd.open_workbook(filepath)
	return ExcelWorkBookObject
def Select_WorkSheet_byName(bookobject, sheetname):
	sname = sheetname.encode('ascii' , 'sheetname')
	ExcelWorkSheetObject=xlrd.Book.sheet_by_name(bookobject,sname)
	return ExcelWorkSheetObject
def Select_WorkSheet_byIndex(bookobject, sheetindex):
	ExcelWorkSheetObject=xlrd.Book.sheet_by_index(bookobject, sheetindex)
	return ExcelWorkSheetObject
def Get_Row(Sheetobject, rowindex):
	rowindex=int(rowindex)
	rw= sheetobject.row(rowindex)
	for col_cnt in range(sheetobject.ncols):
		rw[col_cnt]= Get_Cell_Value_by_index(sheetobject, rowindex, col_cnt)
		return rw
def Get_Row_Count(sheetobject):
	return sheetobject.nrows-1		
def Get_Cell_Value_by_Index(sheetobeject, rowindex, colindex):
	rowindex = int(rowindex)
	colindex =int(colindex)
	return sheetobject.cell_value(rowindex, colindex)
def Get_Cell_Value_by_column_name(sheetobj, rowindex, colindex):
	rowindex = int(rowindex)
	spec_col_ind = -1
	for col_cnt  in range(sheetobj.ncols):
		tmep_col = sheetobj.cell_value(0, cal_cnt)
		if str(colname) == str(tmep_col):
			spec_col_ind = col_cnt
			break
	if spec_col_ind ==-1:
		errortext = 'column name' +colname +'Not found'
		raise AssertionError(errortext)
	return Get_Cell_Value_by_index(sheetobj, rowindex, spec_col_ind)
if  __name__=="__main__":
	fileobj = Open_ExcelFile("D:\\other_Stuff\\test_amazon.xls")
	shtIbj  = Select_WorkSheet_byName(Fileobj, "TestSheet")
	print		Get_Cell_Value_by_Column_name(shtIbj, 5, "Application URL")

// For loop
///
///

type( , "App name from excel sheet")
click( )
wait( )
find( )
click( )
wait( )
click( )
click( )



it showing error in import xlrd,os..

can you please check the code .. and suggests me, it would graceful to
me


--R

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.