I am just starting with lua, and i have some code, from someone with some intentionally mistakes in it. Now i've hit a roadblock getting this error on and on for the following code:
function SIM_Utils:ClickButton(app, buttonName)
page = app:getTopPage()
widgets = page:getWidgets(buttonName)
print (type(widgets))
print (widgets[1])
widgets[1]:click(true, 5000)--this yields "attempt to index field '?' (a nil value)"
widgets[1]:click(false,0)--this yields "attempt to index field '?' (a nil value)"
app:captureScreen()
end
This will result in:
table
WidgetCommon (09590790)
L.E.
After running what Alex posted here is the result:
widgets=
table: 0A45CF28
1
WidgetCommon (09590790)
Is table: 0A... the answer i am looking for?
L.E. 2: Reposted the whole function since it seems this is where the problem lays