CSS selector of 'compose' button in Gmail invalid when used as selector in Puppeteer
Right now I am trying to write a script which sends email automatically. I am using Puppeteer. In the process of sending an email from gmail I have to click on the 'compose' button obviously. So right clicked on that button and clicked on the inspect option. Afterwards I copied the selector of this element (you can do this by right clicking the part of the code that appears and click copy>copy selector). The selector is
#\3a 4e > div > div. Then I copied this in my script and tried to run it, but I got an error :
'#a 4e > div > div' is not a valid selector.
What seems weird to me is that the
\3 has disappeared.
I dont understand why it is not a valid selector. I have been using puppeteer using other websites and there I did the same procedure of copying the selector and using that in the script. Somehow in this case it doesn't work. I have to note that I am new to this business.作者: etotheipi 的来源 发布者： 2017 年 12 月 27 日
作者: Pasi 发布者: 2017 年 12 月 30 日
var selector = '#\\3a 4e > div > div'