var x='PROMPT \"Page\" '; document.getElementById("demo").innerHTML = x ; <p id="demo"></p> Check the code and adjust according to that...
It seems that, the problem was that I need to SET !EXTRACT NULL before adding another value to it! That was the problem! VERSION BUILD=8881205 RECORDER=FX SET !ERRORIGNORE YES SET !EXTRACT_TEST_POPUP NO SET !TIMEOUT_STEP 2 TAB T=1 TAG POS={{!LOOP}} TYPE=A ATTR=CLASS:lienPhotoGrid&&HREF:#/detail/* EXTRACT=HREF TAB OPEN TAB T=2 URL GOTO={{!EXTRACT}} TAG POS=1...
javascript,select,checkbox,imacros
Maybe this could help you: URL GOTO=javascript:{var<SP>chkBoxes=document.getElementsByName("category[]");for(i=0;i<chkBoxes.length;i++)chkBoxes[i].checked=true;undefined;} ...
As a variant, replace your last line of code with: TAG POS=1 TYPE=IMG ATTR=ALT:resulting<SP>barcode CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT ...
javascript,jsp,selenium,sap,imacros
you can do it with Test tools listed below: Apache JMeter. I ever used to test our BOE platform automatically(Login BOE, click folder, open document, refresh document...). It records your operation, and repeats the operations. PhantomJS. A headless browser, not a real browser. You can write Javascript to operate the...
I'm not sure what end result should be, but to fix the error you just need to escape the backslashes. Since it's being eval, you need to basically double-escape all backslashes: eval("var b='{{!extract}}'; var s = b.replace(/\\n\\s*\\n/g, '\\n'); s;") ...
excel-vba,user-controls,imacros
You can use your 'clear all' functionality before changing the color of the row of the cell that you navigated to. Open the VB Editor and right click --> view code on the worksheet that you want the row highlighting to take place. Paste in this code: Private Sub Worksheet_SelectionChange(ByVal...
javascript,php,html,css,imacros
Based on the JSFiddle and the image you showed, it looks like some of the inputs are hidden. You can use this code to grab the visible inputs: var isVisible=function(node){ return (node.offsetWidth && node.offSetWidth >0) || (node.offsetHeight && node.offsetHeight>0); }; var inputs=[].filter.call(document.querySelectorAll('input'),isVisible); var usernameInput=inputs[0]; var hoursInput=inputs[1]; console.log(usernameInput,hoursInput); The code logs...
javascript,loops,firefox,command-line,imacros
Use only one file "TodaysEvents.js". And let it be like this: const L = "\n"; iimPlayCode("TAB T=1" + L + "URL GOTO=http://www.event.com/schedual" + L); for (i = 1; i < 130; i++) { iimSet("loop", i); iimPlayCode("SET !ERRORIGNORE YES" + L + "TAG POS={{loop}} TYPE=A ATTR=TXT:02 EXTRACT=HTM" + L + "SAVEAS...
for (var i = 1; i < 18; i++) { document.querySelector(".foo table > tbody > tr:nth-child(" + i + ") > .goo:nth-child(2) > a").click(); } ...
The Recordset object reads the first line of the CSV as the table headers, so the second line is the first data row. You can avoid this by using a driver that you can instruct not to do that: strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sDir & _ ";Extended Properties=""text;HDR=No;FMT=Delimited"";" or...
Try this pseudo-URL: URL GOTO=javascript:{function<SP>pageScroll(){window.scrollBy(0,50);/*horizontal_and_vertical_scroll_increments*/scrolldelay=setTimeout("pageScroll()",100);/*scrolls_every_100_milliseconds*/}pageScroll();} ...
Finally got it working!! TAB T=1 SET !LOOP 0 SET !VAR1 152429 ADD !VAR1 -{{!LOOP}} URL GOTO=javascript:gotoProductPage({{!VAR1}},'1') WAIT SECONDS=1 URL GOTO=http://localhost/guitar-sale-sample Above "Play (Loop)" in the Firefox extension, I defined the Max to 2000, so each time it loops its keeps on substracting x+1 to !VAR1, looping through the 2000...
You haven't incremented the 'row' variable. You need to include "row = row + 1" right before "Loop", or if you really want to use the Activecell idea, you can put "row = ActiveCell.row" right before 'Loop' (although the other way makes more sense and will be faster) Even if...
Try this: 1.Go back to home page of Google Analytics before script ends 2.And then let new url(2nd row data from excel sheet be called in URL GOTO={{!COL1}})...
Probably, this could help you (but without a wildcard): SET !ERRORIGNORE YES SET !TIMEOUT_STEP 0 TAG POS=1 ... TAG POS=2 ... SET !ERRORIGNORE NO SET !TIMEOUT_STEP 6 ...
Use the command 'EVAL' and 'switch'-clause. As an example: ... SET !DATASOURCE tv-series.csv SET !DATASOURCE_LINE 1 SET lineNumber EVAL("switch ('{{!COL1}}') {case 'Game of Thrones': s = 2; break; case 'Something Else': s = 5; break; /* etc. */}") SET !DATASOURCE_LINE {{lineNumber}} ... ...
Use double-slash: inputInfo += "SET !DATASOURCE E:\\example.csv" + "\n"; ...
I've never been able to load jQuery into an imacros script, but that's not such a big deal in the end. To access the DOM you need to refer each element as: window.content.document.getElementsByClassName('foo') for example. This will give you an array so be sure to pick each of the elements...
excel,vba,internet-explorer,excel-vba,imacros
I don't think the issue is in the code. As you've said, the code works fine and so the only thing that changed is the version of the browser and iMacro. An IE11 update possibly could have broken your macro: http://imacros.net/microsoft-update-for-ie11-kb3025390-breaks-tag-command-in-imacros-for-ie If you must use iMacros with IE11, another workaround...
... SET !EXTRACT EVAL("var s=\"{{!EXTRACT}}\"; x=s.replace(\"£\",\"\"); x;") ' in order to see the extracted value use 'PROMPT'' PROMPT {{!EXTRACT}} SET !EXTRACT NULL ...
javascript,bash,loops,firefox,imacros
As Shugar pointed out, the only solution is to use javascript. The scripting interface the comes with iMacros Browser is different from the built in JavaScript interpreter in Firefox iMacros. The iMacros Browser only works on windows, so its a bummer for linux users, yet the Firefox add-on is universal....
You can use EVAL to emit exception: SET !VAR1 EVAL("/sorry/.test('{{!URLCURRENT}}') && MacroError('wrong page')") ...
You can store the value in local storage localStorage.setItem("stopNumber", stopNumber); Retrieve it with stopNumber = parseInt(localStorage.getItem("stopNumber")); More info here http://www.w3schools.com/html/html5_webstorage.asp...
loops,search,if-statement,extract,imacros
Comment your line SET !ERRORIGNORE YES
Remove the SET !LOOP 1 part. Then open the file and save it as UTF8 file and run it in iMacros....
Change the SET line to: SET !VAR1 EVAL("var s=\"{{!CLIPBOARD}}\"; s = s.split(\"(B)\"); var r = s[1];r ") split doesn't modify the string it is called from. Also, I removed the limit of 1 you passed in to the split method, because that will make it only return the first index...
Question self-solved after changing "contact" and "about" to 'contact' and 'about' TAG XPATH="(/html/body//a[contains(@href,'contact') or contains(@href,'about')])[1]" ...
javascript,jquery,html,imacros
One way would be to use a 'bookmarklet'. Those are small javascript snippets, which you can insert into your bookmark bar and then execute by clicking on them. <a href="javascript:(function(){alert(1);})()">Drag me to bookmarks for alert</a> For Example, drag the link in this fiddle into your bookmark bar and it will...
You can have 100% control over Firefox with Python, as both are open source. The trick is to figure out details. Here are some starting points Python can script Firefox with Selenium WebDriver With some tricks, you can dive deeper into Firefox what basic Selenium interaction offers, like opening a...
Here is the more detailed answer with a code. TAG POS=1 TYPE=TD ATTR=CLASS:"score" EXTRACT=TXT SET !EXTRACT EVAL("'{{!EXTRACT}}'.match(/\\d+/)[0];") TAG POS=1 TYPE=TD ATTR=CLASS:"score part" EXTRACT=TXT SAVEAS TYPE=EXTRACT FOLDER=* FILE=scores.csv TAG POS=2 TYPE=TD ATTR=CLASS:"score" EXTRACT=TXT SET !EXTRACT EVAL("'{{!EXTRACT}}'.match(/\\d+/)[0];") TAG POS=2 TYPE=TD ATTR=CLASS:"score part" EXTRACT=TXT SAVEAS TYPE=EXTRACT FOLDER=* FILE=scores.csv WAIT SECONDS=4 Play this macro...
javascript,dom,web-scraping,scrape,imacros
Relative positioning doesn't meet well this issue, so: SET !EXTRACT_TEST_POPUP NO TAG POS=1 TYPE=SPAN ATTR=TXT:*Banana* EXTRACT=HTM SET FP EVAL("parseInt('{{!EXTRACT}}'.match(/check-num-(\\d)/)[1]) + 1;") TAG POS={{FP}} TYPE=A ATTR=TXT:* ...
You need to add quotes between the commas in your csv file. Below is an example Example: 0,123 -> "0","123" should work or you can change the delimiter from , to ; For that put following code before SET !DATASOURCE C:\Users\Sahil\Desktop\cloth.csv SET !DATASOURCE_DELIMITER ;...
SET longWait EVAL("('{{!LOOP}}' % 30 == 0) ? 120 : 0") WAIT SECONDS={{longWait}} ...
Without Eval there is no way to using javascript code inside iim file.
Don’t waste your time with the built-in editor. Use more advanced ones: ‘Sublime Text’, ‘Notepad++’ etc. (The symbol of a line break (new line) is \n there.)
It looks like you're trying to use 's' before you define it. var macroStart; macroStart ="CODE:"; macroStart +="SET !ERRORIGNORE YES" + "\n"; macroStart +="SET !TIMEOUT_TAG 1" + "\n"; macroStart +="SET !TIMEOUT_STEP 1" + "\n"; macroStart +="SET !TIMEOUT_PAGE 30" + "\n"; macroStart +=" SET !REPLAYSPEED FAST" + "\n"; macroStart +="SET !TIMEOUT_MACRO...
TAG POS=1 TYPE=A ATTR=HREF:link EXTRACT=TXT This should work....
javascript,c#,web,simulation,imacros
If you want it for .net, then there is WatiN. Here is an example how to use it: public void SearchForWatiNOnGoogle() { using (var browser = new IE("http://www.google.com")) { browser.TextField(Find.ByName("q")).TypeText("WatiN"); browser.Button(Find.ByName("btnG")).Click(); bool contains = browser.ContainsText("WatiN"); } } p.s. You can also try Test Recorder for generating macros....