Need to disable certain DOM elements on a webpage

Discussion of the technology underlying the eValid solution.

Need to disable certain DOM elements on a webpage

Postby JJohnson » Wed Dec 14, 2016 1:56 pm

Afternoon.

You guys have a cool product, but I want to disable a particular DOM element in the web page I'm testing...

Can eValid do that?

Thanks
JJohnson
 
Posts: 1
Joined: Wed Dec 14, 2016 1:53 pm

Re: Need to disable certain DOM elements on a webpage

Postby eValid » Thu Dec 15, 2016 1:05 pm

JJohnson wrote:Afternoon.

You guys have a cool product, but I want to disable a particular DOM element in the web page I'm testing...

Can eValid do that?

Thanks


Very good question; thanks for asking JJohnson.

Usually it is very impolite to manipulate the contents of the DOM of the current page in any way because such an action violates a "prime directive" of testing:

Don't modify what you are testing if you want your results to be meaningful.

That said, yes, we can imagine times when you want to disable something in a DOM element.

First, find the element in question, using eValid IndexFind/IndexFindEx commands:

http://www.e-valid.com/Products/Documen ... ement.html

http://www.e-valid.com/Products/Documen ... nt.ex.html

Next you need to look at the contents of that element so you know which "property" you are dealing with.

For this you use the PageMap for that particular index:

http://www.e-valid.com/Products/Documen ... p.gui.html

Now comes the interesting part.

You can use the DOM Element Value extraction/insertion commands:

http://www.e-valid.com/Products/Documen ... ation.html

First you use ValueSet value to put the string you want to insert into the internal variable "elementValue", and then you use the ValuePutElement wid name "frame-path" command to put your own stuff in the DOM.

WARNING: This can be unhealthy in regard to the bevavior of the web page...so caution is strongly advised.

--eValid Support
eValid
 
Posts: 2392
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Technology

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons