webautomation

Web automation from C++

こ雲淡風輕ζ 提交于 2019-11-30 07:31:41
We need to do some fairly complex web automation from C++ application (log into application, do some actions, logout), but performance is really important so we are looking at options. Is there a way to drive WebKit or other headless engine directly from C++, without the need for few more layers in between (like selenium+webdriver+network communication+...)? Chromedriver perhaps? If option 1 is not possible, what is the most optimal way to run WebDriver (with real browser) from C++? You should look into PhantomJS (a headless WebKit browser), which comes with GhostDriver , which is the

Selenium Webdriver vs Mechanize

佐手、 提交于 2019-11-30 04:57:25
I am interested in automating repetitive data entry in some forms for a website I frequent. So far the tools I've looked up that would provide support for this in a headless fashion could be Selenium WebDriver and Mechanize. My question is, is there a fundamental technical difference in using once versus the other? Selenium is mostly used for testing. I've also noticed some folks use it for doing exactly what I'm looking for, and that's automating data entry. Testing becomes a second benefit in that case. Is there reasons to not use Selenium for what I want to do over Mechanize? Does it not

How to code vba to open internet explorer in new session?

夙愿已清 提交于 2019-11-29 15:14:36
I am struggling to get this done since months, how to code VBA to open internet explorer in new session i have an application with many logins i need to open them simultaneously using automation , i have used set ie=new InternetExplorer but it opens the ie within the old session, i want to open new session for each and every login please help me, i googled a lot for it but ended up with out any solution. this is my code Function GetIE() As InternetExplorer Dim WScript Dim objShellWindows Set objShell = CreateObject("Shell.Application") Set objShellWindows = objShell.Windows Set WScript =

Web automation from C++

不想你离开。 提交于 2019-11-29 10:02:32
问题 We need to do some fairly complex web automation from C++ application (log into application, do some actions, logout), but performance is really important so we are looking at options. Is there a way to drive WebKit or other headless engine directly from C++, without the need for few more layers in between (like selenium+webdriver+network communication+...)? Chromedriver perhaps? If option 1 is not possible, what is the most optimal way to run WebDriver (with real browser) from C++? 回答1: You

Puppeteer: Get inner HTML

丶灬走出姿态 提交于 2019-11-29 09:27:38
does anybody know how to get the innerHTML or text of an element. Or even better; how to click an element with a specific innerHTML. This is how it would work with normal javascript: var found = false $(selector).each(function() { if (found) return; else if ($(this).text().replace(/[^0-9]/g, '') === '5' { $(this).trigger('click'); found = true } Thanks in advance for any help! This is how i get innerHTML: page.$eval(selector, (element) => { return element.innerHTML }) E. Fortes This should work with puppeteer:) const page = await browser.newPage(); const title = await page.evaluate(el => el

Python, mechanize, proper syntax for setting multiple headers?

喜你入骨 提交于 2019-11-29 07:02:35
I can't seem to find how to do this anywere, I am trying to set multiple headers with python's mechanize module, such as: br.addheaders = [('user-agent', ' Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3')] br.addheaders = [('accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')] But it seems that it only takes the last br.addheaders.. so it only shows the 'accept' header, not the 'user-agent' header, which leads me to believe that each call to 'br.addheaders' overwrites any previous calls to this.. I can't figure the

Selenium Webdriver vs Mechanize

余生长醉 提交于 2019-11-29 02:34:55
问题 I am interested in automating repetitive data entry in some forms for a website I frequent. So far the tools I've looked up that would provide support for this in a headless fashion could be Selenium WebDriver and Mechanize. My question is, is there a fundamental technical difference in using once versus the other? Selenium is mostly used for testing. I've also noticed some folks use it for doing exactly what I'm looking for, and that's automating data entry. Testing becomes a second benefit

Automatic login script for a website on windows machine?

落花浮王杯 提交于 2019-11-28 15:55:22
I saw some guy had a file (I guess a batch file). On clicking of the batch file he was able to log in to multiple sites. (Perhaps it was done using VB.) I looked for such a script on Google but didn't find anything useful. I know a bit of C++ and UNIX (also some HTML and JavaScript). I don't know if it can be done on a windows machine using these languages, but even if it could be done I think it would be difficult compared to VB or C## or some other high level languages. I learned how to open multiple sites using basic windows batch commands enclosed in a batch file like: start http://www

How to code vba to open internet explorer in new session?

前提是你 提交于 2019-11-28 09:05:04
问题 I am struggling to get this done since months, how to code VBA to open internet explorer in new session i have an application with many logins i need to open them simultaneously using automation , i have used set ie=new InternetExplorer but it opens the ie within the old session, i want to open new session for each and every login please help me, i googled a lot for it but ended up with out any solution. this is my code Function GetIE() As InternetExplorer Dim WScript Dim objShellWindows Set

Puppeteer: Get inner HTML

那年仲夏 提交于 2019-11-28 02:44:17
问题 does anybody know how to get the innerHTML or text of an element. Or even better; how to click an element with a specific innerHTML. This is how it would work with normal javascript: var found = false $(selector).each(function() { if (found) return; else if ($(this).text().replace(/[^0-9]/g, '') === '5' { $(this).trigger('click'); found = true } Thanks in advance for any help! 回答1: This is how i get innerHTML: page.$eval(selector, (element) => { return element.innerHTML }) 回答2: This should