Questions tagged [htmlelements]

Html Elements is a Java framework providing easy-to-use way of interaction with web-page elements in ui web tests.

Html Elements is a Java (actually there are .NET and php implementations) framework providing easy-to-use way of interaction with web-page elements in web-page tests. With the help of the Html Elements framework you can group web-page elements into blocks, encapsulate logic of interaction within them and then easily use created blocks in page objects.

You can find useful documentation and examples in project repository https://github.com/yandex-qatools/htmlelements

140 questions
2271
votes
14 answers

How can I select an element with multiple classes in jQuery?

I want to select all the elements that have the two classes a and b. So, only the elements that have both classes. When I use $(".a, .b") it gives me the union, but I want the intersection.
Mladen
  • 25,578
  • 11
  • 39
  • 48
706
votes
8 answers

jQuery: Get selected element tag name

Is there an easy way to get a tag name? For example, if I am given $('a') into a function, I want to get 'a'.
configurator
  • 40,828
  • 14
  • 81
  • 115
111
votes
7 answers

What is the difference between D3 and jQuery?

Referring to this example: http://vallandingham.me/stepper_steps.html it seems that the D3 and jQuery libraries are very similar in the sense that they both do DOM manipulation in an object-chaining way. I'm curious as to know what functions D3…
zcaudate
  • 13,998
  • 7
  • 64
  • 124
24
votes
8 answers

How can I check in JavaScript if a DOM element contains a class?

How can I check in JavaScript if a DOM element contains a class? I tried the following code, but for some reason it doesn't work... if (document.getElementById('element').class == "class_one") { //code... }
Florian Müller
  • 7,448
  • 25
  • 78
  • 120
24
votes
4 answers

javascript - get custom attribute based on an id

How can I find the seq number given the id in this example?
20101015 600 730
robert
  • 625
  • 3
  • 12
  • 23
21
votes
2 answers

Rotate all html element (whole page) 90 degree with CSS?

I want to display every thing in the page rotated consistently and dependently 90 degree, I tried to do it but the result was inaccurate and each element rotated independently.
Hussein
  • 653
  • 3
  • 10
  • 28
15
votes
1 answer

React Testing Library with TypeScript: Set an input's value

I'm building a React application using TypeScript. I do my component tests using React Testing Library. Let's say you have simple form like this: import React from 'react' function Login({onSubmit}) { return (
J. Hesters
  • 13,117
  • 31
  • 133
  • 249
10
votes
2 answers

Can I use my own optionally namespaced HTML tags if I'm setting the CSS for each one?

I'd like to my own HTML tags but I don't want new tags that might use the same name to cause them to break in the future. Is this a good idea? Could I use a namespace to avoid conflicts? Example: HTML : item 1item…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
6
votes
4 answers

How to get elements inside tags using queryselector?

var divElement = document.createElement("div"); divElement.setAttribute('id', 'Items'); var ulElement = document.createElement("ul"); var liElement = document.createElement("li"); var spanElement1 = document.createElement("span"); var spanElement2…
coder
  • 149
  • 2
  • 2
  • 8
5
votes
1 answer

Extending HTML tag elements in React and TypeScript

I am using typescript in a React project and I want to add tag's props. I can access the properties of the link element but not the properties a element. I am getting an error when the properties of the link tag use an a tag. Is there an…
yunusunver
  • 530
  • 6
  • 16
5
votes
3 answers

Typescript: Convert HTMLElement to Node

How can I convert a HTMLElement to a Node element. According to this answer (https://stackoverflow.com/a/9979779/639035 ) a An element is one specific type of node... but I cannot find a way to convert them. I specifically need a Node element, to…
Stefan
  • 14,826
  • 17
  • 80
  • 143
4
votes
3 answers

HTML Elements (tr &td) are showing on the client side

This is my first question on stack overflow, so I hope that I'm doing this correctly! I'm working with pulling some data from an API, and then displaying that data in a table. So far my table is showing the HTML elements of
+…
4
votes
3 answers

Move tags/elements in dom with PHP

I have a problem, I'm coding my own helper class in php, but I want to move tags/elements in the DOM (document), for example, I want to move link tag in head and js to bottom in body... (to do like $("link").appendTo("head").remove(); in jquery) How…
Célestin
  • 202
  • 1
  • 8
3
votes
3 answers

How to add HTML elements in to JavaScript object and use in react

This is code in a JavaScript object const AlbumDetails = [ { name: 'Basic', price: '', details: [], }, { name: 'Intermediate', price: '', details: [] }, { name: '
Viranga
  • 35
  • 1
  • 8
3
votes
5 answers

How to include code as text in an HTML page

I'm creating a webpage and I want to include code in the webpage. The problem I'm having is that I can't figure out a way to indent lines of code without having lots of different tags. For example if I wanted to display the code: for (int i = 0; i…
Seank462
  • 51
  • 3
1
2 3
9 10