Top "Getattribute" questions

Uncaught TypeError: Cannot call method 'toString' of null

I'm trying to create a class in JavaScript to validate a form. That'll check the form elements and validate a …

javascript getelementbyid getattribute
Uncaught TypeError: Cannot read property 'contains' of undefined

Hi i like to loop trough all "slide" items that contains a class active and take their "data-headertext" attribute. What …

javascript getattribute
How to retrieve the value of the attribute aria-label from element found using xpath as per the html using Selenium

I have the following HTML span: <button class="coreSpriteHeartOpen oF4XW dCJp8"> <span class="glyphsSpriteHeart__filled__24__red_5 …

python selenium selenium-webdriver webdriver getattribute
Javascript: setAttribute works, getAttribute fails

I have this code: var object1 = getElementByID('obj1'); alert(object1.getAttribute('href')); This displays correctly the URL in the …

javascript href setattribute getattribute
Using __getattribute__ or __getattr__ to call methods in Python

I am trying to create a subclass which acts as a list of custom classes. However, I want the list …

python getattr getattribute
How to Get Element By Class in JavaScript and change aria-checked="false" to "true"?

I am trying to select multiple classes on a page and change the aria-checked="false" to aria-checked="true". Here is …

javascript getelementbyid getattribute
getAttribute of elements with some class doesn't work

I have some input fields with a specific class. They all have a data attribute, say data-somedata with an integer …

javascript class attributes input-field getattribute
How to use Selenium using Xpath to determine the classes of an element?

I am trying to use xpath within selenium to select a div element that is within a td. What I …

xpath selenium getattribute
How to get boolean value with requst getAttribute java?

How to get boolean value set as an attribute value in request. Consider the following snippet protected void doPost(HttpServletRequest …

java httprequest getattribute
getAttribute not returning complete value for style in selenium

I am using the selenium getAttribute("style") method on the following id element:- <div id="ntsDiv_1" style="width: 250…

selenium selenium-webdriver getattribute