Automating web form submission on page with .gsp extension - webforms

I need to enter data into the following web form 2,700 times: http://sg.sensemaker-suite.com/collector/modifyfragment.gsp
I have a CSV file with all the data that needs to be entered into the form... basically an ID and a text field of several sentences. The process will be to enter the user name, password, language, and the ID. Click load. Enter a specific page number and wait for it to load. Enter field of text and click to save. Repeat this process with another line of data from the CSV.
I'd like to automate this process and would appreciate any suggestions for software or scripting resources? I've never done this before so the simpler the better. I have a comp sci background (used C/C++, Java, PHP) but have not programmed seriously in years.
Thanks!!

Related

How to send only one e-mail with mutiple pictures uploaded on power automate?

I'm a bit of a noob regarding power automate and i'm trying to learn.
I've been tasked to create a form and link the information on a sharepoint list in a workgroup. So far, everything work but if a customer choose to upload more than one picture, when the e-mail is sent, if for example 4 pictures are sent, there will be 4 e-mail sent instead of one with the link of the picture in sharepoint.
Can someone help me or point me in the right direction in order to send only one e-mail with the link in the body for all the pictures uploaded?
Here's is a preview of my flow below.
All you have to do is first to iterate the pictures to assemble an HTML string which you can concatenate to include as many pictures you want, then after the iteration finish you can use a single email action to send your message on which you are going to place the HTML string variable that contains the output of the iteration.
I'm adding an screenshot so you can visualize the idea, notice I'm using only one Apply to each action instead of two because I don't know your data structure, however, this should work for nested Loops too, as long as you send the email action after all the loops finish (outside of them).
Edit: It doesn't have to be HTML code, it can be just text if all you want are the links.
I hope this can be of help.

Form in Joomla website to run script

I'm new to Joomla and quite newbie to websites in general.
I want to provide the user a form with a couple of text-input widgets and some check-buttons. After the user fill them and hit the "Submit" button I want to run a (python) script in the background. The script will collect some data from the internet and make a specific plot. The plot is embebed in a HTML document (I'm using Bokeh here), which I should present back to the user.
And I need some help to figure out how to do it.
Doubt number 1: I saw that there are some Form extensions around (e.g, Form Maker), but do I need them?
Doubt number 2: How do I trigger the execution of a (python) script on my system, wait for its return and access the output (let's say output is called 'plot.html')
Doubt number 3: The output (plot.html), should I present it on a new tab of the user's client or may I embed at this point in the page where the form is (below the form, for example)?
Thank you
You could start by creating a small Joomla module. In its tmpl/default.php file, just create the form in HTML as you would with any other form - have the form submit to itself.
In the module's entry point mod_mymodule.php, use a conditional to check the form has been submitted, then use one of PHP's program executions functions, such as exec, to run your Python code, passing in the needed variables.
Finally display the your output HTML in tmpl/default.php passing it as a variable in from mod_mymodule.php.

Laravel Save Markdown to Database - Don't Understand

I am reluctant to post this, but I am having trouble understanding how markdown actually "saves" to a database.
When I'm creating a migration, I will add columns and specify the type of value (i.e. integer, text, string, etc.) and in the course of operation on the website, users will input different information that is then saved in the DB. No problem there.
I just can't seem to wrap my head around the process for markdown. I've read about saving the HTML or saving the markdown file, rendering at runtime, pros and cons all that.
So, say I use an editor like Tiny MCE which attaches itself to a textarea. When I click "Submit" on the form, how does that operate? How does validation work? Feel free to answer my question directly or offer some resource to help further my understanding. I have an app built on Laravel so I'm guessing I'll need to use a package like https://github.com/GrahamCampbell/Laravel-Markdown along with an editor (i.e. Tiny MCE).
Thanks!
Let's start with a more basic example: StackOverflow. When you are writing/editing a question or answer, you are typing Markdown text into a textarea field. And below that textarea is a preview, which displays the Markdown text converted to HTML.
The way this works (simplified a little) is that StackOverflow uses a JavaScript library to parse the Markdown into HTML. This parsing happens entirely client side (in the browser) and nothing is sent to the server. With each key press in the textarea the preview is updated quickly because there is no back-and-forth with the server.
However, when you submit your question/answer, the HTML in the preview is discarded and the Markdown text from the textarea is forwarded to the StackOverflow server where is is saved to the database. At some point the server also converts the Markdown to HTML so that when another user comes alone and requests to view that question/answer, the document is sent to the user as HTML by the server. I say "at some point" because this is where you have to decide when the conversion happens. You have two options:
If the server converts the HTML when is saves it to the Database, then it will save to two columns, one for the Markdown and one of for the HTML. Later, when a user requests to view the document, the HTML document will be retrieved from the database and returned to the user. However, if a user requests to edit the document, then the Markdown document will be retrieved from the database and returned to the user so that she can edit it.
If the server only stores the Markdown text to the database, then when a user requests to view the document, the Markdown document will be retrieved from the database, converted to HTML and then returned to the user. However, if a user requests to edit the document, then the Markdown document will be retrieved from the database and returned to the user (skipping the conversion step) so that she can edit it.
Note that in either option, the server is doing the conversion to HTML. The only time the conversion happens client-side (in the browser) is for preview. But the "preview" conversion is not used to display the document outside of edit mode or to store the document in the database.
The only difference between something like StackOverflow and TinyMCE is that in TinyMCE the preview is also the editor. Behind the scenes the same process is still happening and when you submit, it is the Markdown which is sent to the server. The HTML used for preview is still discarded.
The primary concern when implementing such a system is that if the Markdown implementation used for preview is dissimilar from the implementation used by the server, the preview may not be very accurate. Therefore, it is generally best to choose two implementations that are very similar or, if available, use the same implementations for both.
It is actually very simple.
Historally, in forums, there used be BBCodes, which are basically pseudo-tags that allow you to format your text in some say. For example [b][/b] used to mean "make this text bold". In Markdown, it happens the exact same thing, but with other characters like *text* or **text**.
This happens so that you only allow your users to use a specific formatting, otherwise if you'd allow to write pure HTML, XSS (cross-site scripting) issues would arise and it's not really a good idea.
You should then save the HTML on the database. You can use, for example, markdown-js which is a Markdown parser that parses Markdown to HTML.
I have seen TinyMCE does not make use of Markdown by default, since it's simple a WYSIWYG editor, however it seems like it also supports a markdown-like formatting.
Laravel-Markdown is a server-side markdown render helper, you can use this on Laravel Blade views. markdown-js is instead client-side, it can be used, for example, to show a preview of what you're writing in real-time.

Browser Plugin to fill a large html form with test data

In one of the flows in a java web application, I have a form page which captures around 50 odd fields. Now to test a code change in the last page in this flow I have to fill almost all the fields in all the pages that come before it (approximately around 75 fields). This takes a lot of effort in creating the test data and testing the change
Most of the time I enter the same data in these fields for testing. Any suggestion to automate this, something like a firefox plugin which could save the form data within the browser and populate it again the next time i want to ?
I tried searching over the internet but I could only find Charles Proxy which isn't what I need exactly.
You can use Selenium or iMacros for Firefox - https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/.

Selenium RC- How to capture dynamic text from an image and type the same in a text box next to it

I am new to Selenium and have been trying to learn it using a registration web page. In the registration page, I have an image which has dynamic text which changes everytime a new registration is done. This text has to be captured and typed in as is inside a text box which is verified for completing registration. In Selenium RC, while inspecting element, the verifyv alue option is disabled.
When I use verifytext, the text is displayed but not value inside the image. Can someone suggest in RC, how I would capture the value inside the image without a Verifyvalue option as this is disabled.
Thanks
S
You are talking about captcha, you can not automate captcha, as it is provided to avoid automation of functionality.
To automate captcha you need human interaction.
You can put break command or use input box, where you can type captcha value and then you can pass it to text box which is provided for captcha text.
For sample script you can visit
HERE
We write script but need to provide break point to insert CAPTCHA code manually. In this situation when script will be executed; every time CAPTCHA code must be entered manually. Use following script for that..
storeEval | prompt("Enter Captcha:") | varName
type | id=recaptcha_response_field | ${varName}

Resources