Questions tagged [element]

In relation to metadata, a data element refers to a singular unit of information that possesses a specific and exact interpretation or semantic value.

What is the best way to update a specific element within a web page?

My current implementation involves utilizing this code snippet within a functional component : return ( <div style={{ height: "700px", overflow: "auto" }}> <InfiniteScroll pageStart={0} loadMore={Fet ...

Locating a li element based on the text content with Selenium using Python

I've been struggling to find a method to click on a specific li element based on its text content. No matter what I attempt, the element remains elusive. The HTML code in question is as follows: <ul class="shoes-sizen-mp" id="ul_top_hypers" style ...

Protractor Throws Element Visibility Issue

When attempting to check a checkbox in the UI, I encounter an "ElementNotVisibleError: element not visible" error. Strangely, I am able to successfully capture and click the checkbox using the console in Chrome developer tools. Has anyone else experience ...

During the second test, Selenium was unable to locate the element

Encountering the same issue with every test script I attempt to create using selenium + TestNG. After the first @test method, webdriver fails to identify elements in the following @test methods. Illustratively, consider the scenario: The web driver loads ...

Retrieve the HTML element by providing its specific index within the DOM structure of the document

I am working with the HTML source of a document stored as a string and have the index i which indicates where an element starts within this string. I am looking to create a function called getElementByIndex(i) that will return the appropriate JavaScript D ...

The process of implementing custom error messages for each input field in VueJs Element

Within my application, there is a form that I am using for server-side validation. However, I am unsure of how to add error messages for specific inputs. The form can be found at . ...

C# and Selenium WebDriver - The Perfect Combination

I am brand new to using Selenium and Web Driver. My question is quite simple, but I apologize if it seems very basic. Currently, I am utilizing Visual Studio 2010 Ultimate with Selenium 2, coding in C#, and using Internet Explorer 9 as the browser. I attem ...

Selenium in c#: Efficiently Waiting for Element to Appear Without Unnecessary Delays or Timeouts

Currently, I am working on a project using selenium and c#. One issue I am facing is that my tool runs very quickly without waiting for the element to be fully ready. Avoiding the use of Thread.Sleep() is recommended in this case. The specified wait time ...

Selecting multiple IDs at once or choosing individual IDs in selenium

When it comes to selecting elements from HTML, what is the correct approach: gathering all IDs on a page together or selecting each ID individually? Let me provide some context. I have an HTML page with information linked to specific IDs. However, these I ...

When the web browser page is zoomed out (Ctrl -), elements do not appear to float

Can you test resizing the window to the minimum (CTRL-)? Here's the link: http://jsfiddle.net/Zty9k/13/ This is the HTML code: <ul> <li><img src="http://i.imgur.com/PBuDAFH.gif"></li> <li><img src="http://i.imgur. ...

Tips on resolving the issue of an element being unclickable at a particular point in Selenium when using

I'm currently testing a script that involves navigating through approximately 200 pages. Each page features an edit button that needs to be clicked on. While I successfully click the button on about half of the pages, the other half presents an error ...

How to Retrieve Element Property Values from the DOM with JavaScript

I am currently attempting to access the property of an element within my webpage. My main objective is to toggle a float property between left and right when a specific onClick event occurs. However, despite my efforts, I am facing challenges in even acces ...

What is the best way to specifically target header elements within article elements using a CSS selector?

As someone who is not well-versed in CSS, I am looking to target specifically the header elements within article elements. I have some understanding of selectors such as #, ., or ,. article header article, header article.header article#header I believe t ...

Tips for selecting a checkbox that triggers an ElementNotInteractableException using Selenium WebDriver and Java

Every time I try to click on a checkbox, it keeps telling me that the element is not interactable. I've attempted various methods such as .click, javascriptexecutor, actions, wait until, thread.sleep, and scroll. Even when I attempt to context click on th ...

How can you use selenium to extract the link from an href attribute of a class element that has a dynamically generated class name?

Below is a condensed version of the element, with more content inside the </div>: <a class="123abc456def" download="" href="https://www.downloadme.com/1jk43jkls.txt role="menuitem" tabindex="-1">< ...

Using CSS to conceal an element when a different element is also invisible

My inquiry is as follows: I currently possess a code that conceals class element 1 when it possesses a specific value (which varies across different sites). Now, my objective is to also conceal class element 2 ONLY IF class element 1 is already hidden. ...

Can we dynamically add an identical DOM structure by clicking a button using jQuery?

I currently have ten text fields within a single div. I am interested in including another set of ten text fields with the same name, class, and id. Is there a way to recycle the existing DOM structure mentioned above, or will I need to generate and add t ...

Validating if the elements within a list in Selenium using Python 2.7 matches the elements on a webpage

from selenium import webdriver fp = webdriver.FirefoxProfile('') driver = webdriver.Firefox(firefox_profile=fp) driver.set_window_size(1400, 1000) driver.get('') list_of_elements = driver.find_elements_by_css_selector('img[title] ...

Element could not be found using its name

I'm really puzzled as to why Selenium webdriver is having trouble locating the element with the name userid. <input class="required" type="text" size="15" maxlength="64" **name="userid"** value="" style="background-color: rgb(255, 255, 255);"> Th ...

Searching for the class _XWk using BeautifulSoup: A beginner's guide

I have discovered a way to locate Google's "quick answer box" by searching for the "_XWk HTML Element using the code below: from bs4 import BeautifulSoup # Beautiful Soup is part of the bs4 package import requests URL = 'https://www.google.com/ ...

The width and height properties in the element's style are not functioning as expected

let divElement = document.createElement("div"); divElement.style.width = 400; divElement.style.height = 400; divElement.style.backgroundColor = "red"; // num : 1 divElement.innerText = "Hello World "; // num : 2 document.body.append(divElement); // Af ...

When using ElementUI, the translation of &nbsp to a space in el-select is not supported

Whenever I am using el-select, the label displays &nbsp but unfortunately it does not change into a space when viewed in the browser For inquiries contact [email protected] <el-select v-model="value" filterable @change="currentSel" id ...

How can I retrieve the HTML content of a ReactJS rectangle element saved in an array?

Within a loop, I am creating rectangle elements and adding them to an array: rectangles = []; render: function() { for (var i = 0 ; i < 10; i++) { rectangles.push (<Rectangle height={this.props.afm} width={this.props.afm} x={xpos} y={ypos} va ...

Utilizing Beautifulsoup to extract elements from Selenium

When utilizing BeautifulSoup with Selenium, I usually start by parsing the entire page using soup = BeautifulSoup(driver.page_source). But what if I only want to parse a specific element from Selenium in BeautifulSoup? If you try the following code snipp ...

Tips on extracting only the initial 3 elements from a table using Selenium Web Driver

I'm struggling to figure out how to extract only the first 3 <td> elements from each row in a table using Selenium and web driver. For example, I need to get 'Vanessa 17 Sociology', 'Mike 18 Maths' and 'Sam 18 English' <table id= "table3"> ...

I am constantly encountering the issue where I receive the error message: Element cannot be found: {"method":"css selector","selector":".user-profile-link"}

For some reason, I am encountering an error message that says: Unable to locate element: {"method":"css selector","selector":".user-profile-link"} - Everything seems to be working fine except for this issue and despite my efforts to find a solution, I ha ...

Is it possible to hide element Y in jQuery when the mouse is not hovering over elements X or Y?

I have a unique setup where I have multiple images displayed side by side, and when I hover over one image, a tooltip specific to that image appears with additional information. The tooltip content is fetched using ajax, but let's not focus on that. ...

JavaScript: retrieving undefined value from a text element

My goal is to retrieve the text entered into each textbox by querying and looping through their ID tags. However, when I attempt to print what I have retrieved, it always displays "undefined". Seems like your post consists mostly of code: </h ...

Is there a way to locate classes containing underscores within them using Selenium?

Having trouble scraping a webpage with a class name containing an underscore, specifically this element: <span class="s-item__time-left">30m</span> == $0 I attempted to locate it by class name: time = driver.find_elements_class_name("s-item_ ...

The button is not responsive to user interactions

For a Magento-based website, I have been developing an automated checkout script using Python 3.8. Everything was working smoothly until we reached the shipping selection stage. The error message "element not interactable" appears when trying to click the ...

The functionality of event binding is unable to function properly on elements that are created dynamically

I am currently developing a shopping cart feature where I store product information in session variables. I have implemented an AJAX functionality to add products to the cart dynamically on the HTML page, which works fine. However, I am facing issues whe ...

HTML & CSS: Modify background rectangle behind text to limit its size within the webpage dimensions

I'm experiencing a unique issue with the current code present in my HTML index file. <div class="titleMessage"> <div class="heading"> <p class="main">NAME HERE</p> <p class="sub">Software Engineer</p ...

Is there a unique shape element, such as a true circle, available in HTML5?

There doesn't seem to be any documentation on this, suggesting they may not exist. However, it's always worth investigating. I am in search of a perfectly circular (or any polygon shape other than a rectangle) element. I can create a circle in canvas, but ...

How can a unique identifier be defined and effectively utilized for selection purposes?

I'm utilizing Selenium to automate a task on a website, and I'm facing a challenge in selecting an item using the following: select = driver.find_element_by_*whatever* Unfortunately, the available whatevers like find_element_by_id, by name, by tag name, ...

Automate button clicking in Selenium WebDriver using Java with changing element IDs

1) A popup is displayed on my website with two options, Yes and No. 2) The IDs of these buttons keep changing dynamically. 3) How can I handle this scenario and click on the Yes button? 4) Both buttons, Yes and No, belong to the same classname which ...

Python - Replicating an element

After spending hours watching Python tutorials and reading multiple books, I still find myself struggling with the copy function. Specifically, I am attempting to copy an ID that is inserted into an element box. Despite locating the element and trying to e ...

Using TypeScript with Angular, you can easily include parameters to HTML tags

I have an HTML element that looks like this: eventRender(info){ console.log(info.el); } This is the output I'm seeing: https://i.stack.imgur.com/G0hmw.png Now, I want to include these attributes: tooltip="Vivamus sagittis lacus vel augue laore ...

When using vue.js, I am able to successfully copy data by clicking on a text box, but unfortunately

I am facing an issue where the copied value from one text box to another is not passing validation upon clicking a checkbox. I need help resolving this issue, and I also have another concern about validating specific text boxes for numbers using regex with ...