I need a script to open each tab in safari when I get "valueIneed" from an internal website 

here is the HTML tag 

```
<td class="orderDetails">

    <p class="details">
        (My Certificate)
    </p>

```

here is what I tried this but this is failing 

```
tell application "Safari"
    do JavaScript "
        var forgiveStatus = document.querySelector('class[details\"(My Certificate).innerHTML;
        " in current tab of first window
    set checkvalue to (do JavaScript "theStatus;" in current tab of first window) as string
end tell

```

for more information it's could have multiple instance of the same tag, and I need to open each one in a new tab, or even better click on them one after one