Hi,
I have recorded the script using the OATS "OpenScript" load testing with web/http.
Note:
I have turning off recording JavaScript correlation setting while recording the script.
When I try to playing back the script it fails with the following error:
Error Code: NODE_NOT_FOUND_EXCEPTION
Error Summary:
The node is not found for the xpath:window[@index='0']//a[@text='Leave Request ' and (@href='http://10.100.102.82:8088/ords/r/icsbpm/leave-request/leave-req-form?p1_h_proc_id=1&request=NEWREQ&clear=1&debug=NO&session=3472561607899&cs=3_SKwsJKFlIVZ9k-6H5dBqGaH-jqkk4HaDW9OZQ1NKPxEx0BsmrEXl1ER_iRFjrLbRAQZOtj0bDMe9Kt5tx4m8g' or @index='25')]
Error Detail:
oracle.oats.scripting.modules.http.api.exceptions.WebHTTPException: The node is not found for the xpath:window[@index='0']//a[@text='Leave Request ' and (@href='http://10.100.102.82:8088/ords/r/icsbpm/leave-request/leave-req-form?p1_h_proc_id=1&request=NEWREQ&clear=1&debug=NO&session=3472561607899&cs=3_SKwsJKFlIVZ9k-6H5dBqGaH-jqkk4HaDW9OZQ1NKPxEx0BsmrEXl1ER_iRFjrLbRAQZOtj0bDMe9Kt5tx4m8g' or @index='25')]
at oracle.oats.scripting.modules.http.api.exceptions.WebHTTPException.createNodeNotFoundException(WebHTTPException.java:33)
at oracle.oats.scripting.modules.http.api.elements.WebHTTPTestObject.handleNodeNotExists(WebHTTPTestObject.java:106)
at oracle.oats.scripting.modules.http.api.elements.WebHTTPTestObject.checkTestObject(WebHTTPTestObject.java:87)
at oracle.oats.scripting.modules.http.api.elements.WebHTTPLink.navigate(WebHTTPLink.java:35)
at oracle.oats.scripting.modules.http.api.elements.WebHTTPLink.click(WebHTTPLink.java:110)
at script.initialize(script.java:116)
at oracle.oats.scripting.modules.basic.api.IteratingVUser.initialize(IteratingVUser.java:428)
at oracle.oats.scripting.modules.basic.api.internal.IteratingAgent.run(IteratingAgent.java:763)
at java.lang.Thread.run(Thread.java:748)
The error occurs @ step # 6 inside the below script:
My script:
import oracle.oats.scripting.modules.basic.api.internal.*;
import oracle.oats.scripting.modules.basic.api.*;
import oracle.oats.scripting.modules.http.api.*;
import oracle.oats.scripting.modules.http.api.HTTPService.*;
import oracle.oats.scripting.modules.utilities.api.*;
import oracle.oats.scripting.modules.utilities.api.sql.*;
import oracle.oats.scripting.modules.utilities.api.xml.*;
import oracle.oats.scripting.modules.utilities.api.file.*;
public class script extends IteratingVUserScript {
@ScriptService oracle.oats.scripting.modules.utilities.api.UtilitiesService utilities;
@ScriptService oracle.oats.scripting.modules.http.api.HTTPService http;
public void initialize() throws Exception {
http.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36");
http.setAcceptLanguage("en-US,en;q=0.9");
think(1420.804);
think(0.205);
think(1.782);
think(2.009);
beginStep("[1] JOB BASKET", 0);
{
http.addCookie(
"ORA_WWV_APP_7D2CF839AAB54=ORA_WWV-PVcr2RlFlBX2JujoKntC3a8z; domain=10.100.102.82; path=/",
null);
http.window(655, "window[@index='0']")
.post("http://10.100.102.82:8088/ords/wwv_flow.accept",
http.querystring(http
.param("p_context=ics-bpm/login/3472561607899")),
http.postdata(
http.param(
"p_json",
"#{\"salt\":\"235400517723223970677669119064692663997\",\"pageItems\":#{\"itemsToSubmit\":[#{\"n\":\"P9999_USER_CODE\",\"v\":\"*****\"#},#{\"n\":\"P9999_PASSWORD\",\"v\":\"*****\"#},#{\"n\":\"P9999_LANG\",\"v\":\"1\"#},#{\"n\":\"P9999_REMEMBER\",\"v\":[]#},#{\"n\":\"P9999_URL\",\"v\":\"\",\"ck\":\"KYtEK08ZiH0JUUAyuR8p-abkJpbMYsacMWi19fsV8VBxhxH5lCQoLNdkh5L9WZopZt5DfhzmnH0Kv7bv7xAXXg\"#}],\"protected\":\"UDk5OTlfVVJM/rhWWeB--30CZyjSPDhqerVZyGdmtWh6yXNzXXLZ9IiunMmd8Yqrp-wbBaifa57VM6LrUkjtwkRbphRDw4mZCCA\",\"rowVersion\":\"\",\"formRegionChecksums\":[]#}#}"),
http.param("p_flow_id", "100"),
http.param("p_flow_step_id", "9999"),
http.param("p_instance", "3472561607899"),
http.param("p_page_submission_id",
"235400517723223970677669119064692663997"),
http.param("p_request", "LOGIN"), http
.param("p_reload_on_submit", "A")),
http.headers(http.header("Cache-Control",
"max-age=0", Header.HeaderAction.Modify),
http.header("Upgrade-Insecure-Requests",
"1", Header.HeaderAction.Modify),
http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)),
false, null, "UTF8");
{
http.solveXPath("web.input.pinstance", "/window[@index='0']",
".//input[@name='p_instance']/@value", "3472561607899",
0, EncodeOptions.None);
}
}
endStep();
beginStep("[2] No Title", 414);
{
http.get(
667,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Rg.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
beginStep("[1] No Title", -8);
{
http.get(
679,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_SBd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"GB18030");
}
endStep();
}
endStep();
beginStep("[3] No Title", -3);
{
http.get(
671,
"http://10.100.102.82:8088/i/libraries/font-apex/2.2.1/fonts/Font-APEX-Small.woff2",
http.querystring(http.param("")), http.headers(http.header(
"Origin", "http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[4] No Title", -5);
{
http.get(
675,
"http://10.100.102.82:8088/i/app_ui/font/apex-5-icon-font.woff2",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[5] No Title", 162);
{
http.get(
683,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Bd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16LE");
}
endStep();
beginStep("[6] LEAVE REQUEST", 8215);
{
http.link(
687,
"window[@index='0']//a[@text='Leave Request ' and (@href='http://10.100.102.82:8088/ords/r/icsbpm/leave-request/leave-req-form?p1_h_proc_id=1&request=NEWREQ&clear=1&debug=NO&session=3472561607899&cs=3_SKwsJKFlIVZ9k-6H5dBqGaH-jqkk4HaDW9OZQ1NKPxEx0BsmrEXl1ER_iRFjrLbRAQZOtj0bDMe9Kt5tx4m8g' or @index='25')]")
.click();
{
http.solveXPath("web.input.pflowid_1", "window[@index='0']",
".//input[@name='p_flow_id']/@value", "112", 0,
EncodeOptions.None);
http.solveXPath("web.input.pSalt_1", "window[@index='0']",
".//input[@id='pSalt']/@value",
"291953309244932943455501539336379220090", 0,
EncodeOptions.None);
http.solveXPath("web.input.pContext_1_xmldecode",
"window[@index='0']",
".//input[@id='pContext']/@value",
"leave-request/leave-req-form/3472561607899", 0,
EncodeOptions.XMLDecode);
http.solveXPath(
"web.link._98",
"window[@index='0']",
".//a[@title='']/@href",
"http://10.100.102.82:8088/ords/r/icsbpm/ics-bpm/job-basket?debug=NO&session=3472561607899",
18, EncodeOptions.None);
}
}
endStep();
beginStep("[7] No Title", 407);
{
http.get(
701,
"http://10.100.102.82:8088/i/app_ui/font/apex-5-icon-font.woff2",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[8] No Title", -8);
{
http.get(
705,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Rg.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[9] No Title", -5);
{
http.get(
709,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_SBd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null, "GB18030");
}
endStep();
beginStep("[10] No Title", -5);
{
http.get(
713,
"http://10.100.102.82:8088/i/libraries/font-apex/2.2.1/fonts/Font-APEX-Small.woff2",
http.querystring(http.param("")), http.headers(http.header(
"Origin", "http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[11] No Title", 62);
{
http.get(
717,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Bd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16LE");
}
endStep();
beginStep("[12] No Title", 14139);
{
http.post(
721,
"http://10.100.102.82:8088/ords/wwv_flow.accept",
http.querystring(http
.param("p_context={{web.input.pContext_1_xmldecode,leave-request/leave-req-form/3472561607899}}")),
http.postdata(http
.param("{{@resourceFile(7602.postData.rsc, UTF-8, true)}}")),
http.headers(
http.header("X-Requested-With", "XMLHttpRequest",
Header.HeaderAction.Modify),
http.header(
"Content-Type",
"application/x-www-form-urlencoded; charset=UTF-8",
Header.HeaderAction.Modify)), true,
"UTF-8", "UTF8");
}
endStep();
beginStep("[13] LEAVE REQUEST", 32);
{
http.window(725, "window[@index='0']")
.get("http://10.100.102.82:8088/ords/r/icsbpm/leave-request/leave-req-form",
http.querystring(
http.param("session",
"{{web.input.pinstance,3472561607899}}"),
http.param("success_msg=QSBuZXcgdGlja2V0ICMoNzIwMDE2Nikgd2FzIGluaXRpYXRlZCBzdWNjZXNzZnVs.#,bHkhIFRoZW1lIGNoYW5nZWQgc3VjY2Vzc2Z1bGx5IQ%2FA8RajseJ_fOcIoucy6Nr5QhnRiBPNBSXUDvFfWA-Go97BZkMnW841Ww85F6X8IEj0ZCT9hJChIe574SPd3a9Eg")),
http.headers(http.header(
"Upgrade-Insecure-Requests", "1",
Header.HeaderAction.Modify)), false, null,
"UTF8");
beginStep("[1] No Title", -11);
{
http.get(
753,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_SBd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"GB18030");
}
endStep();
}
endStep();
beginStep("[14] No Title", 344);
{
http.get(
741,
"http://10.100.102.82:8088/i/libraries/font-apex/2.2.1/fonts/Font-APEX-Small.woff2",
http.querystring(http.param("")), http.headers(http.header(
"Origin", "http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[15] No Title", -8);
{
http.get(
745,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Rg.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[16] No Title", -8);
{
http.get(
749,
"http://10.100.102.82:8088/i/app_ui/font/apex-5-icon-font.woff2",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[17] No Title", 47);
{
http.get(
757,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Bd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16LE");
}
endStep();
beginStep("[18] JOB BASKET", 7196);
{
http.get(
761,
"{{web.link._98,http://10.100.102.82:8088/ords/r/icsbpm/ics-bpm/job-basket?debug=NO&session=3472561607899}}",
null, http.headers(http.header("Upgrade-Insecure-Requests",
"1", Header.HeaderAction.Modify), http.header(
"Referer", "http://10.100.102.82:8088/",
Header.HeaderAction.Modify)), true, null, "UTF8");
{
http.solveXPath(
"web.link._134",
".//A[@title='']/@href",
"apex_authentication.logout?p_app_id=100&p_session_id=3472561607899",
16, EncodeOptions.None);
}
}
endStep();
beginStep("[19] No Title", 301);
{
http.get(
765,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_SBd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null, "GB18030");
}
endStep();
beginStep("[20] No Title", -5);
{
http.get(
769,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Rg.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[21] No Title", -8);
{
http.get(
773,
"http://10.100.102.82:8088/i/libraries/font-apex/2.2.1/fonts/Font-APEX-Small.woff2",
http.querystring(http.param("")), http.headers(http.header(
"Origin", "http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[22] No Title", 11);
{
http.get(
777,
"http://10.100.102.82:8088/i/app_ui/font/apex-5-icon-font.woff2",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[23] No Title", 200);
{
http.get(
781,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Bd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16LE");
}
endStep();
beginStep("[24] ICS BPM Login", 3763);
{
http.window(785, "window[@index='0']")
.get("http://10.100.102.82:8088/ords/{{web.link._134,apex_authentication.logout?p_app_id=100&p_session_id=3472561607899}}",
null,
http.headers(http.header(
"Upgrade-Insecure-Requests", "1",
Header.HeaderAction.Modify)), false, null,
"UTF8");
}
endStep();
beginStep("[25] No Title", 280);
{
http.get(
795,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_SBd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null, "GB18030");
}
endStep();
beginStep("[26] No Title", -2);
{
http.get(
799,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Rg.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[27] No Title", -4);
{
http.get(
803,
"http://10.100.102.82:8088/i/libraries/oracle-fonts/OracleSans_Web/WOFF/OracleSans_W_Bd.woff",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16LE");
}
endStep();
beginStep("[28] No Title", -5);
{
http.get(
807,
"http://10.100.102.82:8088/i/libraries/font-apex/2.2.1/fonts/Font-APEX-Small.woff2",
http.querystring(http.param("")), http.headers(http.header(
"Origin", "http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
beginStep("[29] No Title", -6);
{
http.get(
811,
"http://10.100.102.82:8088/i/app_ui/font/apex-5-icon-font.woff2",
null, http.headers(http.header("Origin",
"http://10.100.102.82:8088",
Header.HeaderAction.Modify)), true, null,
"UTF-16BE");
}
endStep();
}
/**
* Add code to be executed each iteration for this virtual user.
*/
public void run() throws Exception {
}
public void finish() throws Exception {
}
}
Thanks,
Ayman