Upon clicking the Submit button in Selenium Webdriver (Java), the passwords field is cleared and the flow is halted

I am encountering a problem in IE11 while using Selenium in Java.

After inputting the username and password into the fields, when I click the Submit button, the password field is cleared and the automation process cannot proceed. Even though it works fine manually, I am unable to continue with the flow using Selenium.

I have already attempted the following without success:

    WebElement Password = driver.findElement(By.id("TxbUSERPASSW"));
    Password.sendKeys(pass);
    JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
    jsExecutor.executeScript("$(arguments[0]).change();", pass);

    //Button Confirm
    driver.findElement(By.id("BtnConfirmSupv")).click();

Can anyone offer assistance?

This is the code for the button:

<input type="submit" name="BtnConfirmSupv" value="Aceptar" id="BtnConfirmSupv" disabled="disabled" style="color:White;background-color:#043B75;border-width:3px;border-style:Outset;font-family:Tahoma;font-size:XX-Small;font-weight:bold;width:100px;">

Answer №1

If you simply delete the following two lines of JavaScriptExecutor code, everything should function correctly.

JavaScriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("$(arguments[0]).change();", pass);

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

JPQL Query Fails to Sort Results Using ORDER BY

I need help with a method that retrieves a HashMap based on a user's department and building, ordering the results alphabetically by user name. private HashMap<Long, String> getCriticalPde(long departmentId, long buildingId) { HashMap<Lo ...

What is the best method to obtain the user id within a Redux action?

I am striving to display only user-related items, so I am attempting to retrieve items by sending a request for data to the user id /api/items/:userid. Utilizing Redux store in this process. Here is my server-side code snippet: router.get("/:userid", (req ...

Tips for keeping the most recently opened accordion in a group by using the is-open attribute to call a function

I have a dynamically populated accordion that updates every 15 seconds. I need to keep track of the last opened accordion group as the dataList can be very large and parsing it for each update is not feasible. Below is the code snippet from my HTML file: ...

Is there a way to make the div visible with just one click instead of two?

var sections = ["intro", "content"]; var visibleSectionId = null; function toggleVisibility(sectionId) { if (visibleSectionId == sectionId) { visibleSectionId = null; } else { visibleSectionId = sectionId; } hideInvisibleSe ...

Key-based user retrieval is unavailable in Express, "findAll" can only be done through email

I've created a straightforward Express/Pug application designed for searching users in a database by "email" or by "key". In this setup, each user is assigned a unique string as their key. The structure of my user model and index model files can be se ...

Trouble with top attribute functionality within animate function

Why does the top attribute in the animate function of JQuery not seem to work, while the opacity attribute functions correctly in the code snippet below? $(function() { $(window).on('scroll', function() { ...

Injecting dynamic content using JavaScript

My goal is to develop a web page where clicking on any of the three images will cause the content to be inserted into the empty div located above the image links. Below is the JavaScript code I'm using: <script type="text/javascript" src="js/jque ...

Collections of both letters and non-letter characters that are aligned

I am attempting to identify sets of characters that contain a mix of letters and non-letter characters, with many of them being just one or two letters. const match = 'tɕ\'i mɑ mɑ ku ʂ ɪɛ'.match(/\b(p|p\'|m|f|t|t ...

What is the process for sending an InMemoryUploadedFile to my S3 storage?

My upload form is quite simple and includes an image as a FileField: def post(request): if request.user.is_authenticated(): form_post = PostForm(request.POST or None, request.FILES or None) if form_post.is_valid(): inst ...

Utilizing Bootstrap Plugins with Nuxt.js: A Step-by-Step Guide

"dependencies": { "ant-design-vue": "^1.7.2", "bootstrap": "^4.6.0", "core-js": "^3.8.3", "nuxt": "^2.14.12", "popper.js": "^1.16.1" } ...

Tips for incorporating JavaScript into your Selenium WebDriver workflow using Java

Looking to integrate JavaScript with WebDriver (Selenium 2) using Java. After following a guide listed on the Getting Started page, I found an initial instruction to run: $ ./go webdriverjs Curious about the specific folder/location where the above ...

How to send a value to a function in Angular from a different function?

Within my Angular Typescript file, I am working with two functions named data and lists. My goal is to pass the variable windows from the function data to the function lists. However, when attempting to call the function lists, I encounter an error: Canno ...

Selenium XPATH fails to interact with a click button

One issue I'm facing is that the first element clicks successfully, but the second one does not, and I cannot figure out why. WebDriverWait(rootdiv, 10).until(EC.element_to_be_clickable((By.XPATH, "//li[@onclick[contains(.,JTC)]]"))) rootdi ...

Maintain the previous state in AngularJS using ui-router

My goal is to preserve the current state of the view, not just the URL and parameters. I am looking to save the entire view along with its scopes. Specifically, I am working on creating a search system similar to Facebook's, but with a unique twist. I ...

Creating a Nuxt3 sitemap for optimal website indexing

Struggling with an issue here. I'm trying to incorporate sitemap generation into my project and utilizing @nuxtjs/sitemap for the task, but it appears that this package is not compatible with Nuxt3 at present. After scouring the internet, I haven&apos ...

css How to target a specific row and column within a table using css selector in Selenium WebDriver

When attempting to locate css=table#Salarytable.dataTable.3.4 in Selenium IDE, the cell highlights correctly. However, when using this locator in my Selenium code... String salary=driver.findElement(By.cssSelector("table#Salarytable.dataTable.3.4")).get ...

Storing data with just a click

Upon clicking the link <a href="http://localhost/redmine/projects/'+ value.id+'">'+ value.name+'</a>, I aim to store the value.id into the following variable: x is the variable. var x = document.getElementById(value.id).va ...

Enhance headers with authLink in react-apollo post-authorization

Utilizing the Github Graphql API has been quite a journey for me. Upon the initial load of my application, I direct the user to fetch an access_token. The process works smoothly, however, since the app has already loaded, I face the challenge of updating ...

Referencing a JSON object

Here is a JSON list of search terms: [ "halo", [ "halo reach", "halo anniversary", "halo 4", "halo 3", "halo mega bloks", "halo 2", "halo sleepsack", "halo wars", "halo reach xbox 360", "halo combat evolved" ], ...

The Reader object cannot utilize the readLine() method when referencing a BufferedReader object

I encountered an error with the following code stating that it cannot find the readLine() method. However, I discovered that replacing readLine() with read() and making a few additional changes resolves the issue. import java.io.*; class Console { public ...