Add elixForms UI automation requests #2

Merged
pierpaolo.mammi merged 8 commits from feature/elixforms-ui-automation into main 2026-08-27 14:38:13 +02:00
4 changed files with 736 additions and 4 deletions
Showing only changes of commit f362be0a84 - Show all commits
@@ -0,0 +1,251 @@
info:
name: Backoffice - Create Group
type: http
seq: 9
http:
method: POST
url: "{{elixFormsRootUrl}}/backoffice/groups/_savedata.jsp"
headers:
- name: Cookie
value: ISIPSESSION=047b770fac5627c03c94030ca0c3b45c; AJSRV=BTN_USER_1787207482458_8771527838545232265; ISIPSESSION_TRACK=99b2488e73af7c61f6e5affceeb32502; JSESSIONID=e3c44b958c4f282660a5fc8ed994
disabled: true
- name: x-requested-with
value: XMLHttpRequest
body:
type: multipart-form
data:
- name: id
type: text
value: "0"
description: IMPORTANT!
- name: name
type: text
value: NewGroup01
- name: name-upper
type: text
value: ""
description: empty
- name: isadmin
type: text
value: "false"
- name: user_visible
type: text
value: "false"
- name: description
type: text
value: NewGroup01 new from API
- name: btnModify
type: text
value: Inserisci
description: ???
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
const noCookieFoundError = "No AJSRV cookie found!";
var ajsrvCookie = bru.getVar("elixFormsAjsrvCookie");
if (ajsrvCookie == null || ajsrvCookie === "") {
console.error(noCookieFoundError, ajsrvCookie);
throw new Error(noCookieFoundError);
}
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: true
examples:
- name: example
request:
url: "{{elixFormsRootUrl}}/AJSRV/metadata/save"
method: POST
headers:
- name: Accept
value: "*/*"
- name: Accept-Encoding
value: gzip, deflate, br, zstd
- name: Accept-Language
value: it,it-IT;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
disabled: true
- name: Cookie
value: ISIPSESSION=047b770fac5627c03c94030ca0c3b45c; AJSRV=BTN_USER_1787207482458_8771527838545232265; ISIPSESSION_TRACK=99b2488e73af7c61f6e5affceeb32502; JSESSIONID=e3c44b958c4f282660a5fc8ed994
- name: Host
value: console-unipr.elixforms.it
disabled: true
- name: Referer
value: https://console-unipr.elixforms.it/ajconsole/
disabled: true
- name: x-requested-with
value: XMLHttpRequest
body:
type: multipart-form
data:
- name: S_616_168008_COL0009
type: text
value: azione_form_AUTOR_firmaAutorizzazione
response:
status: 200
statusText: OK
headers:
- name: date
value: Wed, 26 Aug 2026 09:01:46 GMT
- name: server
value: '""'
- name: content-security-policy
value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'; img-src 'self' blob: data: https:;"
- name: content-type
value: application/json;charset=UTF-8
- name: content-length
value: "1636"
- name: strict-transport-security
value: max-age=31536000; includeSubDomains
- name: x-frame-options
value: SAMEORIGIN
- name: x-xss-protection
value: "1"
- name: x-content-type-options
value: nosniff
- name: referrer-policy
value: unsafe-url
- name: keep-alive
value: timeout=10, max=500
- name: connection
value: Keep-Alive
body:
type: json
data: |-
{
"errors": {
"objectList": []
},
"result": {
"objectList": [
{
"id": 616,
"title": "WFTemplate",
"dataId": 168008,
"tag": "",
"objectId": 35274,
"sections": [
{
"title": "Template",
"key": "SEC_0006",
"orderKey": "ORD001",
"fields": [
{
"type": "STRING",
"key": "COL0014",
"title": "Titolo template",
"searchable": false,
"valueList": [
{
"key": "",
"value": "Autorizzazione sottodominio"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD001",
"defaultValue": null,
"required": false
},
{
"type": "HTML",
"key": "COL0009",
"title": "Template",
"searchable": false,
"valueList": [
{
"key": "",
"value": "azione_form_AUTOR_firmaAutorizzazione"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD002",
"defaultValue": null,
"required": false
}
],
"attributes": []
},
{
"title": "Metadata",
"key": "SEC_0007",
"orderKey": "ORD002",
"fields": [
{
"type": "STRING",
"key": "COL0010",
"title": "Tag azione",
"searchable": false,
"valueList": [
{
"key": "",
"value": "azione_form_AUTOR_firmaAutorizzazione"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD001",
"defaultValue": null,
"required": false
},
{
"type": "STRING",
"key": "COL0011",
"title": "Tag procedimento",
"searchable": false,
"valueList": [
{
"key": "",
"value": "gestione_siti_web_nuovo_wf"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD002",
"defaultValue": null,
"required": false
},
{
"type": "STRING",
"key": "COL0012",
"title": "Tag modulo",
"searchable": false,
"valueList": [
{
"key": "",
"value": "RequestForm_GESTIONE_SITI_WEB_NUOVO"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD003",
"defaultValue": null,
"required": false
}
],
"attributes": []
}
],
"categories": [],
"aclTable": [],
"master": false,
"attributes": []
}
]
}
}
@@ -0,0 +1,183 @@
info:
name: Backoffice - Dashboard
type: http
seq: 11
http:
method: GET
url: "{{elixFormsRootUrl}}/backoffice/backoffice_console.jsp?IUQOID=0&IURTLGY=&IUXSID=TX_I4453_UNIPR_{{unixTimestamp}}_R{{randomRID}}"
headers:
- name: Host
value: console-unipr.elixforms.it
- name: Referer
value: https://console-unipr.elixforms.it/backoffice/
params:
- name: IUQOID
value: "0"
type: query
- name: IURTLGY
value: ""
type: query
- name: IUXSID
value: TX_I4453_UNIPR_{{unixTimestamp}}_R{{randomRID}}
type: query
description: Must be computed by executing "Login - Backoffice"
auth: inherit
runtime:
scripts:
- type: after-response
code: |-
/*
const ajsrvCookie = bru.cookies.get("AJSRV");
const jsessionidCookie = bru.cookies.get("JSESSIONID");
//console.log("AJSRV: ", ajsrvCookie);
//console.log("JSESSIONID: ", jsessionidCookie);
bru.setVar("elixFormsAjsrvCookie", "AJSRV=" + ajsrvCookie);
bru.setVar("elixFormsJsessionidCookie", "JSESSIONID=" + jsessionidCookie);
*/
- type: tests
code: |-
test("AJSRV cookie found", function () {
const ajsrvCookie = bru.cookies.get("AJSRV");
expect(ajsrvCookie).to.not.be.null;
expect(ajsrvCookie).to.not.be.empty;
});
test("JSESSIONID cookie found", function () {
const jsessionidCookie = bru.cookies.get("JSESSIONID");
expect(jsessionidCookie).to.not.be.null;
expect(jsessionidCookie).to.not.be.empty;
});
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: example
request:
url: https://console-unipr.elixforms.it/CISIInformationUnit/ExecuteTransaction.jws
method: POST
headers:
- name: Host
value: console-unipr.elixforms.it
- name: Referer
value: https://console-unipr.elixforms.it/backoffice/
params:
- name: IUXSID
value: TX_I4453_UNIPR_1787737266508_R-1756946974
type: query
disabled: true
body:
type: multipart-form
data:
- name: username
type: text
value: Automation_User
- name: password
type: text
value: n_HH9shL#VPeiiT^%;:t5/,jY
- name: INSERT_BTN00000
type: text
value: Accedi
response:
status: 200
statusText: OK
headers:
- name: date
value: Wed, 26 Aug 2026 10:34:54 GMT
- name: server
value: '""'
- name: content-security-policy
value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'; img-src 'self' blob: data: https:;"
- name: x-powered-by
value: JSP/2.2
- name: content-type
value: text/html;charset=UTF-8
- name: set-cookie
value: JSESSIONID=da31f0432559043377f947047c89; Path=/; HttpOnly
- name: vary
value: Accept-Encoding
- name: strict-transport-security
value: max-age=31536000; includeSubDomains
- name: x-frame-options
value: SAMEORIGIN
- name: x-xss-protection
value: "1"
- name: x-content-type-options
value: nosniff
- name: referrer-policy
value: unsafe-url
- name: keep-alive
value: timeout=10, max=500
- name: connection
value: Keep-Alive
- name: transfer-encoding
value: chunked
body:
type: html
data: |+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!-- include the local application global jsp file -->
<style type="text/css">
* {
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 12px;
color: #444444;
font-weight: normal;
}
.logo {padding:3em 0 0 0; margin:0;text-align:center;}
.container {padding:0; width:30em;margin:0 auto;text-align:center;}
h1 {font-weight:bold;margin: 2em 0 1em 0;}
form fieldset {border: none;text-align:left;}
form fieldset label {float:left; width:40%;display:block;text-align:right;padding: 0.3em;}
form fieldset .fieldcontainer {float:left; width55%;}
.end {clear:both;height:0.1em;line-height:0.1em;font-size:0.1em;width:100%}
</style><div class="logo"><img alt="Logo" src="/images/HeaderStemmaLogon.gif"></div><div class="container"><h1>ISIPortal - Backoffice</h1><form action="/CISIInformationUnit/ExecuteTransaction.jws?IUXSID=TX_I4453_UNIPR_1787740495631_R-970713504" method="POST" name="frmFEPA" txid="TX_I4453_UNIPR_1787740495631_R-970713504"><fieldset><label for="username">Nome Utente:</label><div class="fieldcontainer"><input class="isiportalPartialAdminFormFieldSingleLineText" id="username" name="username" type="text" value=""></div><div class="end">&nbsp;</div><label for="password">Password:</label><div class="fieldcontainer"><input class="isiportalPartialAdminFormFieldSingleLineText" id="password" name="password" type="password" value=""></div><div class="end">&nbsp;</div></fieldset><div><input class="isiportalPartialAdminINSERT_BTN00000Button" name="INSERT_BTN00000" type="submit" value="Accedi"></div></form></div>
@@ -0,0 +1,275 @@
info:
name: Backoffice - Save Group
type: http
seq: 10
http:
method: POST
url: "{{elixFormsRootUrl}}/backoffice/groups/_savedata.jsp"
headers:
- name: Accept
value: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
- name: Accept-Encoding
value: gzip, deflate, br, zstd
- name: Accept-Language
value: it,it-IT;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
- name: Cache-Control
value: max-age=0
- name: Connection
value: keep-alive
- name: Cookie
value: ISIPSESSION=047b770fac5627c03c94030ca0c3b45c; AJSRV=BTN_USER_1787207482458_8771527838545232265; ISIPSESSION_TRACK=99b2488e73af7c61f6e5affceeb32502; JSESSIONID=e3c44b958c4f282660a5fc8ed994
disabled: true
- name: Host
value: console-unipr.elixforms.it
- name: Origin
value: https://console-unipr.elixforms.it
- name: Referer
value: https://console-unipr.elixforms.it/backoffice/groups/groups_right.jsp?id=103
- name: Upgrade-Insecure-Requests
value: "1"
- name: User-Agent
value: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0
- name: Sec-Fetch-User
value: ?1
- name: Sec-Fetch-Site
value: same-origin
- name: Sec-Fetch-Mode
value: navigate
- name: Sec-Fetch-Dest
value: frame
- name: Sec-Ch-Ua-Platform
value: '"Windows"'
- name: Sec-Ch-Ua-Mobile
value: ?0
- name: Sec-Ch-Ua
value: '"Not=A?Brand";v="99", "Microsoft Edge";v="151", "Chromium";v="151"'
body:
type: form-urlencoded
data:
- name: id
value: "103"
- name: name
value: Test 01
- name: name-upper
value: TEST 01
- name: isadmin
value: "false"
- name: user_visible
value: "false"
- name: description
value: Test 01 updated
- name: btnInsert
value: Modifica
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
/*
const noCookieFoundError = "No AJSRV cookie found!";
var ajsrvCookie = bru.getVar("elixFormsAjsrvCookie");
if (ajsrvCookie == null || ajsrvCookie === "") {
console.error(noCookieFoundError, ajsrvCookie);
throw new Error(noCookieFoundError);
}
*/
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: true
examples:
- name: example
request:
url: "{{elixFormsRootUrl}}/AJSRV/metadata/save"
method: POST
headers:
- name: Accept
value: "*/*"
- name: Accept-Encoding
value: gzip, deflate, br, zstd
- name: Accept-Language
value: it,it-IT;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
disabled: true
- name: Cookie
value: ISIPSESSION=047b770fac5627c03c94030ca0c3b45c; AJSRV=BTN_USER_1787207482458_8771527838545232265; ISIPSESSION_TRACK=99b2488e73af7c61f6e5affceeb32502; JSESSIONID=e3c44b958c4f282660a5fc8ed994
- name: Host
value: console-unipr.elixforms.it
disabled: true
- name: Referer
value: https://console-unipr.elixforms.it/ajconsole/
disabled: true
- name: x-requested-with
value: XMLHttpRequest
body:
type: multipart-form
data:
- name: S_616_168008_COL0009
type: text
value: azione_form_AUTOR_firmaAutorizzazione
response:
status: 200
statusText: OK
headers:
- name: date
value: Wed, 26 Aug 2026 09:01:46 GMT
- name: server
value: '""'
- name: content-security-policy
value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'; img-src 'self' blob: data: https:;"
- name: content-type
value: application/json;charset=UTF-8
- name: content-length
value: "1636"
- name: strict-transport-security
value: max-age=31536000; includeSubDomains
- name: x-frame-options
value: SAMEORIGIN
- name: x-xss-protection
value: "1"
- name: x-content-type-options
value: nosniff
- name: referrer-policy
value: unsafe-url
- name: keep-alive
value: timeout=10, max=500
- name: connection
value: Keep-Alive
body:
type: json
data: |-
{
"errors": {
"objectList": []
},
"result": {
"objectList": [
{
"id": 616,
"title": "WFTemplate",
"dataId": 168008,
"tag": "",
"objectId": 35274,
"sections": [
{
"title": "Template",
"key": "SEC_0006",
"orderKey": "ORD001",
"fields": [
{
"type": "STRING",
"key": "COL0014",
"title": "Titolo template",
"searchable": false,
"valueList": [
{
"key": "",
"value": "Autorizzazione sottodominio"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD001",
"defaultValue": null,
"required": false
},
{
"type": "HTML",
"key": "COL0009",
"title": "Template",
"searchable": false,
"valueList": [
{
"key": "",
"value": "azione_form_AUTOR_firmaAutorizzazione"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD002",
"defaultValue": null,
"required": false
}
],
"attributes": []
},
{
"title": "Metadata",
"key": "SEC_0007",
"orderKey": "ORD002",
"fields": [
{
"type": "STRING",
"key": "COL0010",
"title": "Tag azione",
"searchable": false,
"valueList": [
{
"key": "",
"value": "azione_form_AUTOR_firmaAutorizzazione"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD001",
"defaultValue": null,
"required": false
},
{
"type": "STRING",
"key": "COL0011",
"title": "Tag procedimento",
"searchable": false,
"valueList": [
{
"key": "",
"value": "gestione_siti_web_nuovo_wf"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD002",
"defaultValue": null,
"required": false
},
{
"type": "STRING",
"key": "COL0012",
"title": "Tag modulo",
"searchable": false,
"valueList": [
{
"key": "",
"value": "RequestForm_GESTIONE_SITI_WEB_NUOVO"
}
],
"itemList": null,
"toManyItems": false,
"attributes": [],
"orderKey": "ORD003",
"defaultValue": null,
"required": false
}
],
"attributes": []
}
],
"categories": [],
"aclTable": [],
"master": false,
"attributes": []
}
]
}
}
@@ -5,7 +5,7 @@ info:
http: http:
method: POST method: POST
url: "{{elixFormsRootUrl}}/CISIInformationUnit/ExecuteTransaction.jws" url: "{{elixFormsRootUrl}}/CISIInformationUnit/ExecuteTransaction.jws?IUXSID=TX_I4453_UNIPR_{{unixTimestamp}}_R{{randomRID}}"
headers: headers:
- name: Host - name: Host
value: console-unipr.elixforms.it value: console-unipr.elixforms.it
@@ -13,9 +13,9 @@ http:
value: https://console-unipr.elixforms.it/backoffice/ value: https://console-unipr.elixforms.it/backoffice/
params: params:
- name: IUXSID - name: IUXSID
value: TX_I4453_UNIPR_1787737266508_R-1756946974 value: TX_I4453_UNIPR_{{unixTimestamp}}_R{{randomRID}}
type: query type: query
disabled: true description: Values are computed in pre-script!
body: body:
type: multipart-form type: multipart-form
data: data:
@@ -28,13 +28,36 @@ http:
- name: INSERT_BTN00000 - name: INSERT_BTN00000
type: text type: text
value: Accedi value: Accedi
disabled: true
auth: inherit auth: inherit
runtime: runtime:
scripts: scripts:
- type: after-response - type: after-response
code: |- code: |-
function generateTenDigitNumber() {
// Minimum 10-digit number: 1000000000
// Maximum 10-digit number: 9999999999
const min = 1000000000; // 10^9
const max = 9999999999; // 10^10 - 1
// Generate random integer in range [min, max]
const randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
return String(randomNum); // Return as string to preserve leading digits
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
var unixTimestamp = Date.now();
//console.log(unixTimestamp);
bru.setVar("unixTimestamp", unixTimestamp);
var r = generateTenDigitNumber(); //getRandomInt(-999999999, 9999999999);
//console.log(r);
bru.setVar("randomRID", r);
/* /*
const headerSetCookie = res.getHeader('set-cookie'); const headerSetCookie = res.getHeader('set-cookie');
console.log(headerSetCookie); console.log(headerSetCookie);