Imacros will not press a button?

I am trying to create a script to publish an automatic blog on Google sites, but the problem is that the button will not click. This is my screenshot: http://i.stack.imgur.com/W5mxq.png

Code button

<div aria-label="New page" tabindex="0" style="-moz-user-select: none;" role="button" id="create-new-btn" class="goog-inline-block jfk-button jfk-button-standard jfk-button-collapse-left" aria-disabled="false"><span id="sites-collaborator-bar-create-new-page-icon" class="sites-camelot-icon"></span></div> 

This is my code in Imacros

IMACROS Code

 VERSION BUILD=7601105 RECORDER=FX TAB T=1 URL GOTO=https://sites.google.com/site/testing/ TAG POS=1 TYPE=DIV ATTR=ID:create-new-btn 

This is different code, but in Javascript Imacros

JAVA Code

 var macro; macro = "CODE:"; macro += "TAB T=1" + "\n"; macro += "SET !ERRORIGNORE YES" + "\n"; macro += "SET !ERRORCONTINUE YES" + "\n"; macro += "SET !EXTRACT_TEST_POPUP NO" + "\n"; macro += "SET !TIMEOUT 500" + "\n"; macro += "URL GOTO=https://sites.google.com/site/testing/" + "\n"; macro += "TAG POS=1 TYPE=DIV ATTR=ID:create-new-btn" + "\n"; iimPlay(macro) 
+4
source share
4 answers

you can just load the new page form, and not click on the button, since clicking will need to emulate a mouse hover and use javascript. Just download: https://sites.google.com/site/your-site/system/app/pages/createPage?source=/home

+1
source

A possible job is to use the CLICK command in imacros, for example:

 VERSION BUILD=7601105 RECORDER=FX TAB T=1 URL GOTO=https://sites.google.com/site/testing/ CLICK X=1000 Y=10 

where X is the distance from the top left of the browser to the middle of the button that you want to click, and Y is the distance from the top of the browser to the middle of the button that you want to click. You can measure these distances by completing the print screen and going to a tool, such as paint , and measure the distances in pixels (or any other tool that is more convenient for you).

0
source

You can try imacros for Firefox instead of Chrome, because in terms of button clicks, imacros works better in the Mozilla Firefox browser.

0
source

Maybe you should try clicking on the span inside this div. Perhaps this causes an action.

 VERSION BUILD=7601105 RECORDER=FX TAB T=1 URL GOTO=https://sites.google.com/site/testing/ TAG POS=1 TYPE=SPAN ATTR=ID:sites-collaborator-bar-create-new-page-icon 
-1
source

Source: https://habr.com/ru/post/1447393/


All Articles