68 questions
0 votes
1 answer
30 views
How to send a message from anonymous script executed with `browser.scripting.executeScript`?
I'm using browser.scripting.executeScript() and i need to send a message to webext background script/service worker script. Usually it means using browser.runtime.sendMessage(), but browser is ...
0 votes
1 answer
257 views
How to get results from an async Javascript script using C# and Microsoft WebView2 control?
I have the following Javascript script: async function getIPAddress() { var thisFuncName = arguments.callee.toString().match(/function ([^\(]+)/)[1]; var retValue = { 'Result': true, ...
1 vote
1 answer
87 views
python selenium execute script confirmation box, getting results back
When running a scraping tool I am in the process of writing I need to interact with the user but prefer not via the console as that means switching between the console and the browser. Problem is I ...
0 votes
0 answers
43 views
After button click in MAIN world return a value from MAIN world of a website to Chrome Extension popup.js
I have a popup.js file that has a button say Button_p. On clicking Button_p, I inject a script inject.js to a website using // snap from popup.js Button_p.addEventListener('click', () => { func();...
2 votes
0 answers
129 views
navigator.storage.getDirectory empty when called from browser.tabs.executeScript?
I'm trying to create a Dev Tools panel to inspect the origin private file system, as it's apparently missing from the Storage panel in the latest version (115) of Firefox LTS. However, when using ...
0 votes
1 answer
210 views
How to type a string with newlines on Selenium chrome IDE
I'm trying to use Selenium IDE to type and submit a handful of strings on a website. Each string is a list of three names that must be separated with each name on its own line. I'm using an execute ...
0 votes
0 answers
236 views
Chrome extension service worker inject script to new about:blank tab
I am writing an extension to create a new tab then run some script. However, the error message "Error: Cannot access "about:blank" at origin "null". Extension must have ...
4 votes
2 answers
3k views
Chrome extension: chrome.scripting.executeScript not working
for some reason my executeScript function is not working. This is my code: async function scrape_get_url(){ console.log("Getting url: " + from_url); var tab_id; chrome.tabs....
0 votes
0 answers
88 views
scripting.executeScript: Calling chrome.tabs.sendMessage right after Causes dreaded "Receiving end does not exist."
Question Is there a way to get around timing issues when injecting a content script via chrome.scripting.executeScript() and sending the tab a message? Issue In this code, I am injecting a content ...
0 votes
1 answer
28 views
Fetching jQuery Objects In Selenium With JavaScript (self answer)
While running Selenium tests on my customizations to a CMS generated donation form I was getting inexplicable errors. I need to get the configuration options for the form from my page. So I did this: ...
0 votes
0 answers
62 views
Nifi : JSON to .csv file transformation
I have a following input in Nifi Jolt Specification processor, that i got from an API : { "BAG": { "Ett": "WWWLOG", "refD": "DVJOB1415738", ...
0 votes
3 answers
1k views
Why the callback result of the chrome.tabs.executeScript method return always an empty object?
I recently discovered the chrome extension development and got stuck with the runtime.excuteScript method, the callback in 3rd argument systematically returns me an empty object ... For brevity, I ...
0 votes
1 answer
103 views
Using execute script in Selenium IDE to calcute a duration of time from two dates on the page
I've been using SIDE to automate some processes at work. I'm collecting some dates from the page using the store command and trying to use the execute script command to calculate a duration and then ...
0 votes
0 answers
320 views
Check if a URL matches one of the patterns in a chrome extension manifest v3 content script "matches" field
I have a chrome extension in which I'm using the chrome.runtime.onInstalled event to reinject my scripts when an update happens. chrome.runtime.onInstalled.addListener((details) => { ...
0 votes
1 answer
62 views
Javascript code failing for success as well
I am writing code in Apache nifi's execute script processor in javascript. NOTE: NO in-built function or method of javascript like isEmpty(), Object.Entries, or etc doesn't works in nifi's processor. ...