I'm converting the version of manifest from 2 to 3, as we cannot use chrome.tabs.executeScript , i'm using chrome.scripting.executeScript to execute the injection
in manifest v2 I had below lines of code
chrome.tabs.executeScript(tabid, {
code: appssoscript[0].chrome,
runAt: 'document_start'
});
where appssoscript[0].chrome consists of value:
document.getElementById("username").value="application_user1";
document.getElementById("password").value="Passw0rd@123";
document.querySelector(".from__button--floating").click();`
in manifest v3 i've changed the code to
chrome.scripting.executeScript({
target: {tabId: tabid},
func : getScript,
args : [appssoscript[0].chrome],
});
in above code I'm executing a function called getScript
where I'm passing argument appssoscript[0].chrome
but the function is not injecting values