Click the button in Webdrivr that triggers a JavaScript function, but be aware that it may not function properly

(1) HTML Code Snippet:

<table class="title_button" onclick="onSave();" onmouseout="this.className='title_button'; save_moveout();" onmouseover="this.className='title_button_hi'; save_movein();" title="Copy Running-config to Startup-config">
    <tbody>
        <tr>
            <td>
                <img id="title_btn_save" src="https://192.168.100.116/image/title_btn_alert.gif">
            </td>
            <td id="title_save">Save</td>
        </tr>
    </tbody>
</table>

(2) Java WebDriver Attempts:

Both attempts below failed to execute as expected.

driver.findElement(By.id("title_save")).click();
driver.findElement(By.xpath("/html/body/div/table/tbody/tr/td/table/tbody/tr/td[8]/table/tbody/tr/td/div/table/tbody/tr/td[2][@id='title_save'")).click();

(3) Error Message:

WebDriver element is not currently interactable and may not be manipulated.

Answer №1

Attempting to click on the td element may not work as expected. Instead, consider clicking on the table element:

driver.findElement(By.className("title_button")).click();

Answer №2

It appears that the element you are attempting to click on is disabled, preventing the click operation from being executed successfully.

You may want to try clicking on a different element instead, such as:

driver.findElement(By.css(".title_button tr")).click();

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Updates to class variable values in jQuery are failing to take effect

Attempting to create my first JavaScript class has presented some challenges, specifically when it comes to updating a class variable. Despite hours of testing different approaches, I still can't seem to get it right! function ClassName(productId) { ...

Retrieving variables using closures in Node.js

I have been developing thesis software that involves retrieving variables within closures. Below is the code snippet written in node.js: var kepala = express.basicAuth(authentikasi); // authentication for login function authentikasi(user, pass, callback ...

I want to know how to use Selenium WebDriver to set a new style for an element

Currently, I am constructing a test plan utilizing Selenium Webdriver in Java for a page that contains a button which opens a small color selection window. Here is the code snippet from the right panel of the color selection window: <span class="ui-co ...

Tips for clearing Nightwatch session storage efficiently

To ensure the pop-up functionality was working properly, I had to reset the browser's session storage. By doing this, the pop-up will reappear. Is there a way to clear the page's Session Storage in Nightwatch? ...

Combining GET and POST requests in ExpressJS on a single route

As I work on setting up a questionnaire in Express JS with EJS as the renderer, I have already created individual pages for each question. These pages are accessible through static links using the app.get('/question/:number?', routes.questions) f ...

Utilizing Spring Boot to Retrieve a File in JavaScript Code Without Activating a Controller

I am working on a Spring Boot project that utilizes plain JavaScript and jQuery. I need to load a .ttf font for a JS plugin without involving a controller. The goal is for the JS code to simply read the file from the project folder. Do you think this ca ...

Sending information to functions through input

I am facing a challenge with an input field setup like this: <input type="text" @input=readInput('usernameInput')> Accompanied by data and methods for handling it: data() { return { usernameInput = false; }; }, readInput(for ...

What is the best way to refresh only the table and not the entire page in a React Js application?

I have created a code that displays loading.. message before the entire content appears. However, I only want to load the table itself. I attempted to separate the "List of Employee" from the button, but unfortunately, it did not work as expect ...

Create an eclipse plugin to enhance functionality of an established desktop application

I am looking to create an eclipse plugin that integrates with an existing desktop application built in Java Swing. This plugin will leverage the functionality of the desktop application while also utilizing features provided by Eclipse, such as refactoring ...

``Trouble with React Dropdown menu option selection"

I am encountering challenges with implementing a dropdown menu list for my react app. The issue at hand is that I have an API where one of the keys (key3) has values separated by commas that I wish to display in my dropdown list. The structure of the API ...

Analyzing JSON data in client-side JavaScript that has been transmitted from a Node.js server

Trying to check out some JSON in the chrome console that was sent from a NodeJS file. No errors are showing up, but for some reason, I can't see the message "hello world" The NodeJS file sends the JSON message after an HTML form is filled o ...

A-Frame: Capturing sweeping panoramic images with code

I am exploring panoramic screen shot capabilities and came across some documentation on how to take screenshots in A-Frame using hot keys. However, I am wondering if there is a method to generate a panoramic screenshot automatically without requiring user ...

Proper method for declaring a global variable within a React component

In the process of working on my react.js project, I have encountered a situation where I need all components to be able to access an object before the main component is rendered. My current approach involves passing the object as a prop to the main compo ...

Is it possible for an "object" to remain in existence even after an attempt to delete it?

Is there a proper method to eliminate an instance of a "class" in JavaScript? I am using node to "require" my classes and their prototypes. Interestingly, setting the instance of the class to equal null does not appear to actually destroy the instance. Fo ...

Troubleshooting JSON Parsing Errors in Android Development

[ { "description": "Our beautiful house", "name": "Cozy Cottage", "point": { "lat": 22.890976, "long": 90.459097 }, "type": 1, "cid": "5319197376176516414" } Here is a sni ...

Struggling to get past the Cloudflare captcha barrier on ahrefs.com with the help of its complimentary DR service while utilizing "seleniumbase"

Check out my script below. I'm utilizing seleniumbase to interact with a website: from seleniumbase import SB, Driver import time with SB(uc=True, test=True) as sb: url = "https://ahrefs.com/website-authority-checker" sb.driver.uc_ ...

The onload function for a JSP embedded in an IFrame was causing the IFrame to expand and fill the entire browser

I am encountering an issue with an IFrame inside a DIV where the SRC attribute is being dynamically set by a JavaScript function. When the SRC is set to "file.jsp", an onload function within the file.jsp containing style adjustments was causing the IFrame ...

Error in Vue.js when attempting to push using the sendMessage method

I am facing an issue with the following method: props: ['convId'], data() { return { messages: [], newMessage: '' }; }, methods: { sendMessage() { axios.post('/send ...

Provide the email address to use on the forum

Is there a way to code an email address in HTML that will be invisible and undetectable by forums? Thank you in advance. I'm looking for a more advanced solution like this one! <h>mariaburkke76</h><h><h><h><h>< ...

Press the button to access the spreadsheet using Selenium in Python and save it

I attempted to use Selenium and Python to download an Excel file by clicking a button on a webpage, but unfortunately, I was unsuccessful. Below is the class extracted from the page: <div class="tabPanel_func ts2_icon_map ts2_icon_excel" oncli ...