Questions tagged [execute-script]

60 questions
0
votes
2 answers

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.

Click on thislinkto access the data

` This renders as Click on thislinkto access the data Problem : Locate all the
sarbjit
  • 3,786
  • 9
  • 38
  • 60
0
votes
2 answers

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 generally get the same…
0
votes
1 answer

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 jsLoad = driver -> ((JavascriptExecutor) driver).executeScript("return document.readyState").toString().equals("complete"); JavascriptExecutor js =…
0
votes
0 answers

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)
Dev S
  • 1
0
votes
1 answer

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

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 Youtube and search for specific keywords, Now I…
0
votes
0 answers

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 not know how to tell the python file that this…
0
votes
0 answers

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[css_example="this is just a example for css selector"]' +…
0
votes
2 answers

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 will spare you all of my manifest.json(v2): ▼…
0
votes
1 answer

Why im not able to use executeScript in my selenium script?

import org.openqa.selenium.*; import org.openqa.selenium.JavascriptExecutor.executeScript;
Gayathri
  • 11
  • 2
0
votes
0 answers

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 use Process_login (with addon function to open…
Eric
  • 357
  • 1
  • 4
  • 14
0
votes
1 answer

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 positions 7-10, and record 6 has 2345 in position…
andym
  • 1
  • 1
0
votes
1 answer

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 file on the tab with the help of…
0
votes
1 answer

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 that it looks like this…
0
votes
1 answer

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 replay capability)...before doing further processing…
GMan
  • 444
  • 1
  • 11
  • 24