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,
...
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
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 ...
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:
...
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
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
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
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
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. ...
0
votes
0
answers
141
views
Python script to compare the data types of a CSV in Apache NiFi
I have created this Python script to compare the data types of a CSV coming from the InputStream with an array of data types,
but I don't understand why I'm getting an error in line number 7 in NiFi.
...
0
votes
1
answer
437
views
How can I use ExecuteScript in Apache Nifi to retrieve a list of files on an FTP server using Python?
I'm new to apache nifi and I am having trouble with writing a script that can give the list of files within a ftp server using the ExecuteScript on apache Nifi.
I have the following script that I'm ...
0
votes
1
answer
1k
views
Getting Unexpected Character ' ' error in Groovy Script in Apache Nifi?
This is the script I have written to replace value of All in jsonData with response. But I am getting error on line 22 mentioned below of unexpected character'(' on line 22.
I'm unable to figure out ...
-1
votes
2
answers
112
views
How can I replace a value in json data in Java?
I am trying to replace API Data with "All" in Emp_Id field in data in json. And then make rows with every data of API.
I tried in ecmascript but I need in Java as this map function is giving ...
0
votes
1
answer
123
views
How to replace a value with another in json data in Groovy?
I am trying to replace API Data with "All" in Emp_Id field in data in json. And then make rows with every data of API.
API DATA: I have stored this data in "Response" attribute in ...
0
votes
1
answer
71
views
Getting object Object in output in executeScript in Nifi?
I am trying to store an API response in attribute myAttr in extractText processor but when I am trying to print the value of myAttr in ExecuteScript it is giving [object Object] in output and not ...
0
votes
1
answer
1k
views
NiFi how do I pass an attribute to the executeScript processor
The flowfile uses evaluateJsonPath in order to extract values and setup my Attributes. I need to pass some of the attributes into a JavaScript function which I have in a ExecuteScript processor. The ...
0
votes
1
answer
734
views
Python selenium scrolling doesn't work when used in class instance
I'm trying to write a selenium script with python that downloads my bills from a website. There are more bills (rows) that can fit in the view port, and when the script reaches the end of the view ...
0
votes
1
answer
385
views
executeScript() method for scrolling throws error as null cannot create object using Selenium Java
For scrolling through a section, I wrote below code:
JavaScriptExecutor js= (JavaScriptExecutor) driver;
js.executeScript (scroll code);
but here executeSctipt method is autosuggested like:
js....
0
votes
0
answers
80
views
document variable not recognized inside callback function when running executeScript
I am currently making a chrome extension that needs to validate whether a user has paid for the service. My background script confirms with the ExtensionPay API (thanks to Glen Chiacchieri) and then ...
-1
votes
1
answer
664
views
Message: javascript error: missing ) after argument list in execute script
When I run the following:
self.driver.execute_script("document.getElementByXpath('//input[@id='someid']').value='someValue';
It gives an error
selenium.common.exceptions.JavascriptException: ...
1
vote
1
answer
496
views
ExecuteScript - get the complete source website
How to use ExecuteScript to get the complete page source - something like browser does with
view-source: https//..any..web..page
If I call ExecuteScript
wbBrowser.ExecuteScript('document....
0
votes
0
answers
546
views
Apache NiFi - Loop over flowfile's attribute value
I'm fairly new to either Stack Overflow and Apache NiFi, but I can't find any solution to my problem.
My incoming Flowfile has an integer value N in an attribute, let's call it myAttribute. What I'm ...
0
votes
1
answer
50
views
Getting error while inserting data in sqlite3
I am new to Python and started off with sqlite.
I have two csv transaction.csv and users.csv from where I am reading the data and writing to the sqlite database.Below is the snippet
import csv
import ...
0
votes
2
answers
639
views
How to get the text before & after the hyperlink using Selenium and Xpath
I am trying to find cases using Xpath/Selenium where there is no white-space before the hyperlink.
e.g.
<p>Click on this<a href="#">link</a>to access the data</p>`
...
0
votes
2
answers
173
views
Button click using Selenium not actionable
I am trying to fill in a registration form and click submit. But Selenium says the Registration button is not actionable. I have tried using actionchains and a couple of other techniques but ...
0
votes
1
answer
1k
views
How to execute executeScript method through Java in Microsoft Edge through WebDriver
I am trying to run below code in Microsoft Edge through WebDriver
ExpectedCondition<Boolean> jsLoad = driver -> ((JavascriptExecutor) driver).executeScript("return
document.readyState&...
0
votes
0
answers
40
views
How to make him press enter after typing the text in ExecuteScript?
i want to make him press enter after typing the text
ChromeDrv.ExecuteScript("document.getElementsByClassName('_6LbR9')[0].innerText=arguments[0]", Msg)
0
votes
1
answer
133
views
Selenium execute_script sending float number in scientific notation
I have this code where I use execute_script to modify the of an element, I need to set it to a float number, I used this code:
WebDriverWait(driver, timeout).until(EC.element_to_be_clickable((By.ID, '...
0
votes
1
answer
356
views
execute_script don't work with Youtube Search : Selenium Python
so I'm fairly new to python but I start to understand how things work together, however for this problem I didn't find any solution.
So my problem is I'm making a simple bot with python that can open ...
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
63
views
How would I use execute_script to notify my python script
So I am using Selenium in python with execute_script to detect certain html changes in a website using MutationObserver, the mutation observer is continuosly detecting the changes I need, however I do ...
0
votes
0
answers
258
views
Selenium does not run a javascript
I'm trying to execute a simple java script command at selenium using python for scroll a part of a web page.
Here's the code:
command_js = 'document.querySelector(' + "'" + 'css_div_example[...
1
vote
2
answers
14k
views
Webview2 ExecuteScriptAsync to click an Input button
Please see below this html code for understand:
<input type="submit" name="send" class="button" value="Send" onclick="return ussd_send()">
<...
1
vote
2
answers
165
views
Protractor browser.executeScript throws Failed: javascript error: missing ) after argument list
When running the protractor script below
let resultantArr = [];
resultantArr = await browser.executeScript("var elements = document.querySelectorAll('ul[class=\'wbs-droplist-container\'][id*=\'...
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
818
views
Why im not able to use executeScript in my selenium script?
import org.openqa.selenium.*;
import org.openqa.selenium.JavascriptExecutor.executeScript;
0
votes
0
answers
493
views
Run chrome.tabs.executeScript only when the new tab is created and loaded
I am trying to create a chrome extension to automate the login process.
I am able to login the website using Process_login2 (fill in the username and password and click login button).
However, when I ...
0
votes
1
answer
2k
views
How to create multiple flow files from one incoming flow files in nifi using ExecuteScript with python
Running locally, this works exactly how I want it to (has one incoming flow file with many different codes in position 7-10 and outputs 1 file per unique code) For example if record 1-5 has 1234 in ...
0
votes
1
answer
1k
views
Content script executed on tab while loading using browser.tabs.executeScript does not triggering window.onload event
In our firefox extension from the background script, we are checking the currently loading tab and check whether the URL is our desired URL if it is our desired URL then we are executing a javascript ...
0
votes
1
answer
161
views
Execute Jquery with null condition using Selenium Python
Hi I tried to send javascript that look like this :
$("img[src|='']").attr('src', result.responseJSON.data);
It's to change image with null value to new value. I'm using execute script so ...
0
votes
1
answer
345
views
Storing small files in hdfs and archiving them in Nifi Flow
I have an issue with small files and HDFS.
Scenario: I am using NiFi to read messages from the Kafka topic, these are all really small.
Requirement: to store these raw messages of data in HDFS(for ...
0
votes
0
answers
210
views
I want to avoid chrome.runtime.lastError when I execute chrome.tabs.executeScript(...)
I am developting chrome-extension.
I try to inject script-tag using chrome.tabs.executeScript, but it occurs some error in specific URLs.
I use this page as reference, but there are many error-logs in ...
0
votes
1
answer
578
views
I need to give link from variable to execute_script(new window) in selenium python
I have a code that will open a new window and switched to before and after which like in code. But I what to give the link from variable why because if I have multiple links to search. For eg:...
0
votes
1
answer
704
views
Python selenium function driver.execute_script() won't execute my code in the script?
In my python script I use selenium function driver.execute_script() which won't execute all code in the script. Specifically, one code works but others not.
This code works:
driver.execute_script("""...
0
votes
2
answers
1k
views
NIFI EXECUTESCRIPT Processor failing - No MODULE FOUND
I am trying to import modules into executescript processor in nifi.
As suggested , I. am giving full path into the modules directory.
example:
Module Directory: /var/lib/nifi/Levenshtein --> which ...
1
vote
1
answer
2k
views
selenium.common.exceptions.InvalidSelectorException: Message: Given xpath expression is invalid using xpath within scrollIntoView through Selenium
I use Python to scrape a website with a filter pane that needs to be scrolled.
I found a code that helps to scroll through the list of elements, that actually find a list and move through a loop.
...