Questions tagged [execute-script]

60 questions
0
votes
0 answers

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 console... I know my extension won't work in the…
0
votes
1 answer

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:search_url =["https://www.google.com",…
0
votes
1 answer

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(""" let w = window.open("{}","_blank"); …
Li54nder
  • 15
  • 4
0
votes
2 answers

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 contains necessary files for the…
0
votes
1 answer

Transfer File to executescript NiFi using python

I am trying to use NiFi ExecuteScript to post messages to an irc chatroom using Python. Am I using the right syntax to pass a flowfile from a queue to the processor? Processor errors out with NameError: global name 'server' is not defined, but I am…
javanewb
  • 35
  • 1
  • 1
  • 6
0
votes
1 answer

selenium.common.exceptions.JavascriptException: Message: TypeError: document.getElementsByClassName(...)[0] is undefined

I am trying to get the program to scroll in a specific div to load all the needed elements contained in it. As far as I can tell, the JavaScript code is correct but it keeps giving me this error: selenium.common.exceptions.JavascriptException:…
0
votes
1 answer

Selenium - check that an object is defined before using it

I'm trying to perform testing using the selenium web driver, and part of this is waiting for my object to be defined on the page. NOTE: there is nothing in the DOM that will appear when my object is available and it is not an option to change that,…
Michael Hackman
  • 491
  • 2
  • 6
  • 21
0
votes
1 answer

set display block to an element found by xpath

I found the elements I'm interested in: LINKS = (By.PARTIAL_LINK_TEXT, "link_to") links = self.browser.find_elements(*self.LINKS) They now have display set for None and I'd like to show them: for link in links: …
Malvinka
  • 1,185
  • 1
  • 15
  • 36
0
votes
1 answer

Unable to click on an element using codeceptjs

enter image description hereI have tried below approaches to click on an element but unable to click and always click in the background of the page:- Using css: submitButtonEnabled: { css: 'button.button--enabled[type="submit"]'…
0
votes
1 answer

Conversion javascript code from storeEval to executeScript_Sandbox (Selenium Ide Kantu Ui.Vision)

I need a conversion of two javascript code to obtain date and time in prefered format from storeEval To executeScript_Sandbox to use in Selenium Ide Kantu Ui.Vision From some update storeEval is deprecated and now need to use the new command…
pachiro
  • 59
  • 6
0
votes
1 answer

Nifi : Execute script Error (cannot create pystring with non-byte value)

I am trying to parse the flow file using executeScript processor. Basically, what I am doing is splitting the flowfile contents using python script and make a csv out of it. It ran fine for my sample data. But every prod message is about 10000 chars…
trougc
  • 329
  • 3
  • 14
0
votes
0 answers

How to Pass an Argument Using tabs.executeScript in a Chrome Extension (value for insertHTML)

I want to change the selected text in the foreground page from the background page of a Chrome extension, using insertHTML. This works, and replaces the text in the foreground page with a bolded "test": chrome.tabs.executeScript( null, …
-1
votes
2 answers

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 error in nifi. API DATA: I have stored this data in…
dash
  • 35
  • 5
-1
votes
1 answer

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: Message: javascript error: missing ) after argument list
-1
votes
1 answer

How to solve element is not clickable at point in Selenium using Python

I am testing a script where I run through about 200 pages. Each page contains an edit button that I need to click on. In about half of the pages this is successfully done, but on the other half I receive an error saying that another element would…
1 2 3
4