Get attribute of SPAN using JavaScript

<span id='abc' email='xyz@gmail.com'> xyz </span>


How to get attribute of SPAN using JavaScript

document.getElementById('abc').getAttribute('email')


How to SPAN content or html or text using JavaScript

document.getElementById('abc').innerHTML

document.getElementById('abc').textContent

Learn GO Programming language by example

I do remember someone said, teach yourself the programming language for 10 years.

https://gobyexample.com/

Detect when url changed java script or jquery

$(window).on('hashchange', function(e){
    var origEvent = e.originalEvent;
    alert(e);
    console.log('Going to: ' + origEvent.newURL + ' from: ' + origEvent.oldURL);
});

Find element in DOM by mutliple classes

If you want an intersection, just write the selectors together without spaces in between.
$('.a.b')
So for an element that has an ID of a with classes b and c, you would write:
$('#a.b.c')

Get Or Find Element in DOM by multiple attributes, role and class

<div id="mydiv">mydiv
<div role="complementary" class="nH abC">myclass1</div>
<div role="complementary" class="nB abd">myclass2</div>
</div>


$(".nH").css('background-color','red');
$('complementary, .abC').css('background-color','green');

Secure Connection Failed + Firefox + Selenium


FirefoxProfile firefoxProfile = new FirefoxProfile();

firefoxProfile.setAssumeUntrustedCertificateIssuer(false);

Webdriver  driver = new FirefoxDriver(firefoxProfile);