Looking to prefill a webpage (a form in a wordpress site) from a lotus notes application. My investigations to date show that using the query strings behind the urlname should work - however I am missing something here.
www.url.com/register?fname="bob"&sname="smith" etc...
I thought this could be done, but am not sure where the starting point would be?
Ideal solution - webservice from the owner of url.com to allow us to populate and get a response once done. They are not keen to do this as it does not save them any time, just our business.
I am looking to understand how to prepopulate the webpage so that the user just has to submit the form at url.com.
You could go mega-sneaky and use the Selenium WebDriver to launch a browser session on your client. It has full control over the browser and can sniff out the fields you need to populate. I wrote some simple code for starters - but the samples on the original web site might be more comprehensive.
Related
I tried commenting on the response by Rob in the original post:
Google Script to Fill out HTML Form
But I am shy of 11 points to do so, hence asking my own question here.
I have a similar web form automation requirement and I like Rob's response on using
UrlFetchApp.fetch(url, options)
I like this approach as it is clean, and can wait for response from server. This helps in batch processing multiple forms. There is no fiddling around with DOM elements or adding delays that may fail due to runtime issues like sudden drop in internet speed.
My question however is, how do I create session if the website requires me to login? I did lookup documentation but couldn't find session options:
https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
I am open to suggestions if I can write my own program in VSCode using Node.js, JQuery, javascript etc, that loads json file as data and something that I can post on GitHub/GitLab for others to use as well. I know VBA method of doing it, but it relies on DOM elements to mimic user interaction. There is another program mini mouse macro that has a great reputation, but its an exe and mimics user interaction of clicks and delays. I want to see code that I am running.
I am trying to set up IBM Watson Assistant Web Chat and from the documentation, it seems pretty simple (just do the config and copy and paste the embed code) https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chat
However, I have found that when I paste this onto my website, navigating to a different page or reloading will just refresh the session. This is not what I want as I want the session to continue off from where it was in the chat (and for all this to be displayed in the window). I have tried looking through the detailed documentation as well, but there doesn't seem to be what I'm looking for: https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=
I have also tried passing in the userid but still on navigation the chat refreshes.
Does anyone know if there's a way to solve this? I really need a solution since the same problem occurs on the live chat integration I have set up with salesforce.
Thanks, in advance
A feature update to support session history is coming soon.
There is a Facebook app which has enabled the depricated facebook-chat feature where users can chat whilst playing their game. Unfortunately there has been a dirge of spammers and scammers posting in this chatroom, which we would wish to automatically detect and send emails or some other alerts to us so that we can more immediately block/ban these users.
Is this possible somehow? What we've tried was to create a python scraping application but it wasn't immediately obvious how to log into facebook and get HTML of an app through a python call.
I've since been introduced to bookmarklets as a concept. Perhaps this could solve the issue? There could be some type of javascript code in a bookmarklet, and all one would need to do is load up the game, open the facebook-chat, and then click the bookmarklet, and leave the computer running 24-7. The javascript would parse the DOM for suspected scam links and send email reminders when found.
This is just me brainstorming possible ideas. I'm really not sure how to approach this automation problem, and I am not finding anything useful online either.
I am currently making a processing program, where a part of it will be to acess some information from at website. The website will be an HTML file, where some information is stored, which i need to acess and parse. I know how to open a html file, but my problem is that it is supposed to acess a list, which is generated after a login on the website. How do i do that?
This is the website, right after loading the HTML file:
http://i.imgur.com/kGIkyle.png
After a login, the website will begin to spit out data every two seconds.
I wanna acess the data in the ordered list, and i wanna acess it every two seconds in my processing program. How do i do that?
This is the website, after a login, after a moment.
http://i.imgur.com/O743fNJ.png
When you use a web browser to submit a login, you're really interacting with the server. Usually the web browser submits a POST request containing the login information (like a username and password), and the server responds with the next webpage to load.
The details of this are going to depend on the website you're interacting with. Some websites might use AJAX to submit the data and then trigger some JavaScript to run.
The point is, you're going to have to understand exactly how the underlying web server and webpage works. Then you're going to have to use the rules of those interactions to issue the appropriate requests from your Processing code.
It might be as simple as submitting the login credentials in the url itself and then just scraping the information from the webpage.
More likely, you're going to have to interact with some kind of web API and do the requests yourself. Google "Java post request" for more info.
Of course, all of this assumes that the website is open to people using it. If this website isn't yours, it could also be locked down and unavailable to you.
I know this question was asked like a million times by now, but I couldn't really find a good up-to-date solution.
I've implemented my own menu to provide the user the ability to Cut, Copy and Paste into my WebApp.
But I'm not sure how to actually work with the clipboard on Firefox, IE, Safari/Chrome.
Thank you for your help.
I just wrote a detailed technical blog post on this very subject (I work for Lucidchart and we recently did an overhaul on our clipboard). Included in the post is this fiddle which is a working example of copying and pasting via Javascript.
The good news is that this example gives you working code for setting/getting any supported clipboard data types whenever the user uses a clipboard hotkey.
The bad news is that using your own context menu to copy and paste is problematic. Even Google can't get around this (try using context-menu copy or paste in Google Docs in Firefox). You'll be able to get it to work without too much trouble in IE. This is because you can access the clipboardData object at anytime from Javascript via:
window.clipboardData
(When you attempt to do this outside of a system cut, copy, or paste event, however, IE will prompt the user to grant the web application clipboard permission.)
In Chrome, you can create a chrome extension that will give your web app clipboard permissions (this is what we do for Lucidchart). Then for users with your extension installed you'll just need to fire the system event yourself when they click the menu option:
document.execCommand('copy');
It looks like Firefox has some options that allow users to grant permissions to certain sites to access the clipboard, but I haven't tried any of these personally.
did u try :
http://ericphan.info/development/cross-browser-copy-and-paste-with-jquery-copy/
UPDATE:
the link is not available so i copy the content from cache :
The Scenario
I was working on a client project for SSW when the client reported a bug in the web app.
The bug involved a dynamically generated mailto link that got updated when you selected multiple employees. The client was reporting an error when he selected more than 10 employees to email. His Lotus Notes mail client popped up an error saying:
Error processing command line arguments
Testing this myself I found that Outlook 2007 could easily support the emails of 30-40 employees before the mailto link stopped working.
The Cause
It turns out that the mailto spec has a limit and the mail clients also have a limit. Lotus Notes only handles 240 characters in the mailto link and other modern mail clients like Outlook 2007 support the 2083 characters - the max length of a URL
This explains the discrepancy in testing.
The fix - JQuery to the rescue
Since this is a limitation of the HTML spec we needed another solution to meet the client’s requirement of “I want to be able to select multiple employees and send an email to all of them”
We could have created an email form that used SMTP to send out the email - but the client wanted to use Lotus Notes as his mail client.
We ended up changing the “email” button to copy all the emails (comma separated) onto the clipboard and popped open a new email window. All the client had to do was hit CTRL + V and paste the emails into the TO field. This was the quickest and most cost effective solution that gave the client the flexibility to use their own email client.
There is a JQuery plugin called jquery.copy that provided cross browser copy and paste by using a flash (swf) file. This is similar to how the syntax highlighter on my blog works.
Once you reference the jquery.copy.js file all you need to do to push data into the clipboard is run the following:
$.copy("some text to copy");
Nice and easy ;)
Note: you may need to change the path the the SWF file in jquery.copy.js to get this to work