0

I am trying to run following lua code with DoFile() in NLua :

import('TestStack.White');
src=luanet.import_type('TestStack.White.UIItems.Finders.SearchCriteria')
application=Application.Launch('C:\\windows\\system32\\calc.exe')
win = application:GetWindow("Calculator");
win:WaitWhileBusy();
btnOne=win:Get(src.ByText("1")) <<---Exception here
btnOne:Click();
win:WaitWhileBusy();

I get following exception while executing this : {Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true.}

Equaivalent .net code which works fine is :

Application application = Application.Launch(@"C:\windows\system32\calc.exe");
Window window = application.GetWindow("Calculator");
window.WaitWhileBusy();

var btnOne = window.Get(SearchCriteria.ByText("1"));
btnOne.Click();
window.WaitWhileBusy();

Please help getting rid of this exception.

Additionally, I would also like to know " Is there a way to load a dll using lua , not already loaded in my .net application?"

Nish26
  • 969
  • 8
  • 16
  • Have you looked at this? http://stackoverflow.com/questions/19117874/late-bound-operations-cannot-be-performed-on-types-or-methods-for-which-contains – Vinicius Jarina May 15 '15 at 17:28
  • In my case , most of the times third party dlls will be used and consumed by lua scripts.So,Changing the code in a manner to work it with lua is not an option. I got it working with ClearScript at the moment and will proceed with it unless i have a better solution for lua. – Nish26 May 16 '15 at 07:49

0 Answers0