How do I click this link using nightmare?

后端 未结 2 1766
小蘑菇
小蘑菇 2021-01-28 06:30

Here is everything involving the link:



        
相关标签:
2条回答
  • 2021-01-28 07:04

    first grab the DOM node and assign to a variable then click on the node. Also you need to add brackets around the selector and don't need the inner single quotes unless there is a space or other invalid character in the value

    var myLink = document.querySelector("[data-style-name=black]");
    .click(myLink)
    
    0 讨论(0)
  • 2021-01-28 07:06

    Also what I did was:

    .click('a[data-style-name="Tan"]')
    

    I specified it was an attribute and it worked.

    0 讨论(0)
提交回复
热议问题