Exception thrown when web element is not visible in Selenium WebDriver

The structure of the element I am trying to locate is as follows:

/html/body/div/div[3]/form/table/tbody/tr/td/**div[2**]/table[2]/tbody/tr[2]/td[2]/input

<input type="password" name="0.2.1.3.3.6.5.1.2.1.1" maxlength="9">

Despite my attempts with XPath and CSS selectors in WebDriver using JavaScript, I still can't find this element.

It seems that there is a script tag within the mentioned div[2] tag - could this be causing the issue?

Your help would be greatly appreciated!

Answer №1

It seems like you're encountering an ElementNotVisibleException in your code. This could be due to selecting the wrong element or not waiting for it to become visible before interacting with it.

You can handle this issue by using new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOf(element))

Answer №2

It is possible to utilize the CSS Selector

css=input[type='password'][maxlength='9']
. Can you confirm if this CSS Selector is functional?

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

Utilizing Jquery for event handling in dynamically created table rows in a datatable

I am attempting to incorporate a function call "onblur" where I can input a new value in the TD cell. What I am looking to achieve is for the new value to be passed by the function to another JQuery script. Unfortunately, the datatable does not seem to rec ...

AG-GRID-ANGULAR - Is there a way to automatically check or uncheck a checkbox in the header component based on the status of checkboxes in the cell renderers?

Currently, I am using ag-grid for my project. In one of the columns, I have a checkbox in the header using headerComponentFramework and checkboxes in the corresponding cells using cellRendererFramework. My goal is to automatically check or uncheck the hea ...

Discovering broken links with Robot Framework

I am currently encountering a problem when trying to identify broken links on the webpage. I am utilizing the RequestsLibrary for this purpose. At the moment, I am successful in identifying all the links but unable to verify them against the response code. ...

Invalid Xpath: TypeError encountered - The expression cannot be converted to return the specified type

When using Selenium with Robot Framework, I encountered the following error: Xpath is invalid: TypeError: The expression cannot be converted to return the specified type. Here is the code snippet causing the error: Set Test Variable ...

The Firebase read counts are increasing rapidly, even during times of inactivity

Explaining the issue I'm facing in detail, I recently embarked on developing my first larger project, a project management app using React. Everything was progressing smoothly until I started working on the task addition feature and updating graphs w ...

Setting the percentage height of parent and child divs in a precise manner

Trying to work through this without causing chaos. I have a container div containing three floated left child divs, with the container div set to 100% height like so: .Container { height: 100%; min-width: 600px; overflow-y: hidden; } One of the child divs ...

Most effective method for retrieving data from a database to display on a React user interface

I am currently working on a project where I need to show the value of a collection property stored using mongoose in my react app's client side whenever a user clicks a button. I am attempting to retrieve the value on click and then use setState to s ...

Is my Discord.js bot malfunctioning due to incorrect indentation, despite the absence of errors?

After spending a considerable amount of time developing this bot, I encountered an issue following an update that introduced 'limitedquests'. Previously, the bot worked flawlessly but now, certain functions are not functioning as intended without ...

Having trouble retrieving a JSON Element in JavaScript using the Object's property

I am having trouble retrieving a specific JSON element from the following JSON structure: { "ACTION": "AA", "MESSAGE": "Customer: 30xxx Already Approved on 2017/01/01" } Even though I receive the data in JSON format, attempting to access data.ACTION or d ...

What is the best way to transfer GitHub OAuth information to a client?

I am in the process of implementing Github authorization and then sending received JSON data to the client. After doing some research, I came across a helpful tutorial at The tutorial suggests following this path: "/" -> "/login" -> "/redirect" -&g ...

My object prototype function is failing to execute properly

Is it possible that I can't utilize Object prototype in this manner? Object.prototype.keyPressed = function(){ var key = (this.keyCode ? this.keyCode : this.which); return key; }; $(document).on('keypress'), function(e){ if (e ...

A better method for locating the index of a class within a `List`dataArray`

So, I'm currently working on this code where I gather elements and store all the class names in a List. Then, I need to find the index of a specific class within that list. This process seems quite lengthy to me. Perhaps using LINQ could simplify it, ...

Make sure to wait for the class to appear before proceeding with Selenium in Firefox

I'm currently facing an issue with making selenium wait until a specific class is available on a page. I've experimented with various code snippets, but so far nothing has proven to be effective. Initially, I tried: while not firefox.find_eleme ...

JavaScript and DOM element removal: Even after the element is removed visually, it still remains in the traversal

Our goal is to enable users to drag and drop items from a source list on the left to a destination list on the right, where they can add or remove items. The changes made to the list on the right are saved automatically. However, we are encountering an iss ...

Discover instances of a string within an array using JQuery

I am currently exploring how to locate occurrences of a specific string within an array on the client side. The examples provided on the JQuery Docs all seem focused on number comparisons, which isn't quite what I need. Essentially, I'm attempti ...

jQuery Refuses to Perform Animation

I'm facing an issue with animating a specific element using jQuery while scrolling down the page. My goal is to change the background color of the element from transparent to black, but so far, my attempts have been unsuccessful. Can someone please pr ...

Tips for ensuring consistent versioning of a library across a website consisting of over 20 webpages

Trying to incorporate a third-party JavaScript library into a website consisting of over 20 HTML pages, each with their own JavaScript and CSS files. The issue arises when a new version of the library is released, requiring manual updating of the version ...

After pressing the button to access the sidebar, all I see is a plain white screen

I've been diligently working on a school project, but I'm encountering some issues with the Sidebar button in the top left corner. Whenever I click on the button, it opens up to display a blank white page. Can anyone provide me with some assistan ...

Is Opera mini 6 displaying an enlarged zoomed view like the mobile view ON option?

I have been experiencing an issue with my JavaScript code. Specifically, only Opera Mini 6 on various types of mobile devices is displaying a zoomed view on my website www.propertiesng.com/mobile. I would greatly appreciate any assistance or insights into ...

Reactjs encountering issues with CSS loading correctly

Currently, I am working with reactjs and utilizing the Nextjs framework. All my "css, js, images" are stored in the "public" folder and have been included in "_app.js". However, whenever I attempt to load the "Main page" in a browser, the page does not d ...