Created
September 29, 2012 02:51
-
-
Save DinisCruz/3802993 to your computer and use it in GitHub Desktop.
TM - Script to do batch save via web Browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var browser = "browser".o2Cache(()=>open.browser()); | |
| browser.parentForm().alwaysOnTop(); | |
| var articles = teamMentor.articles(); | |
| var count = 1; | |
| foreach(var article in articles) | |
| { | |
| "[{0}/{1}] saving: [{2}] {3}".info(count++ ,articles.size(), article.Library, article.Title); | |
| var url = "http://localhost:3187/editor/{0}".format(article.Id); | |
| browser .open(url) | |
| .waitForCompleted() | |
| .wait(500, false) | |
| .eval("$('#saveChanges').click()") | |
| .wait(500, false); | |
| browser.waitForCompleted(); | |
| } | |
| return "done"; | |
| //O2Ref:tmp3582.tmp.dll | |
| //using SecurityInnovation.TeamMentor; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment