Bouzouki
3 years agoOccasional Contributor
Variables Not Passed From Batch File
CD "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin" TestExecute.exe "C:\dev\TestComplete\PDFCompare_DiffPdf\PDFCompare_DiffPdf.pjs" /r /p:PDFCompare_DiffPdf /pv:p_FilesStoreDirectory="I:\QC...
- 8 years ago
I don't think you need a switch statement for this at all. It doesn't make sense to use a switch statement to make a decision between two boolean values. I'd write the code like this:
var panelButtons = page.FindChildEx("Name", "Panel(3)", 10, true, 10000); //thanks to Alex for suggesting ‘FindChildEx’ var btnAccept = panelButtons.FindChild("idStr", "ctl00_MainContent_btnAcceptEula", 10); page.Wait(); if (btnAccept.Exists){ Log.Message("EULA page loaded."); btnAccept.scrollIntoView(false); btnAccept.ClickButton(); } else { Log.Message("EULA page did not load."); }