How to open Dev Tools using Test Complete?
These are the steps I tried but did not work.
{
//Opens the specified URL in a running instance of the specified browser.
//Browsers.Item(btChrome).Navigate("https://example.com/");
//Clicks the 'BrowserWindow' object.
// Pressing Ctrl+Shift+F to open find dialog
//function sendCtrlShiftI() {
// Press and hold Ctrl and Shift keys, then press I, and release all keys
// aqUtils.SendKeys("^+I");
}
function Test1() {
// Opens the specified URL in a running instance of the specified browser.
Browsers.Item(btChrome).Navigate("https://example.com/");
// Accessing Chrome's Developer Tools using TestComplete
var page = Sys.Browser("chrome").Page("https://example.com/");
// Execute JavaScript to open Chrome Developer Tools
Sys.Keys(^+I);
// page.RunBrowserCommand("Developer Tools");
// Alternatively, you can use the following line to open the Developer Tools:
// page.Keys("^+I");
}
You could just do:
function openDevTools() {
Sys.Browser("chrome").Page("*").Keys("[F12]")
}