c# - TestStack/White API -
i'm trying automate application using teststack/white api (which based on microsoft's ui automation library).
the problem following:
at point of automation, have deal "dialog" window, looks separate process, if @ "windows task manager". no matter how try access "dialog window" (class, id, text, controltype, etc.) i'm not able access it.
you can find uispy image , code below...
using uispy - dialog information
using (var disclaimer_app = application.attach(@"pathtoexecutable")) using (var disclaimer_window = disclaimer_app.getwindow(searchcriteria.byclassname("#32770"), initializeoption.nocache)) { var iaccept_button = disclaimer_window.get<button>(searchcriteria.bytext("i accept")); iaccept_button.click(); } # i've tried application.launch, application.attachorlaunch. # looked sure dialog window separated process , doesn't belong parent window.
any suggestions?
found solution, had use "processstartinfo()" , pass return data "application.attachorlaunch()":
var psi = new processstartinfo(@"pathtoexecutable"); using (var disclaimer_app = application.attachorlaunch(psi))
source: http://techqa.info/programming/tag/white?after=24806697
Comments
Post a Comment