The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> Micro Focus/Borland/Segue SilkPerformer

Pages: 1
PrasadNew
Newbie


Reged: 03/21/10
Posts: 6
Customization of script in WebpagesubmitBin()
      #698978 - 02/20/12 05:06 AM

Hi,

I want to parse the VIEWSTATE view and to use that within the WEBPAGESUBMITBIN() function as the Viewstate value changes for different user in my project.

1. Is it possible to customize the content of WebPageSubmitBin() values to take the default HTML value of VIEWSTATE without parsing that value?

2. Can we create a dclform separately by taking the name value pairs from WebpageSubmitBin()?

3. The form name in WebPageSubmitBin (i.e 'ct100') in my recorded script is different from the form name (i.e. 'aspnetForm') of that web page (i got When checked the viewsource of that page). So can i change to the form name to 'aspnetForm' in WebPageSubmitBin?


Some part of my scripts is as follow...

WebPageSetActionUrlAbs("http://dashinfoqa/CustomerSite/Sales.aspx", CUSTOMER_SALES_ASPX014);

WebPageSubmitBin("ctl00", "-----------------------------7dc3057190256\r\n"
"Content-Disposition: form-data; name=\"__EVENTTARGET\"\r\n"
"\r\n"
"ctl00$MainContent$ScrnNav$SalesButton\r\n"
"-----------------------------7dc3057190256\r\n"
"Content-Disposition: form-data; name=\"__EVENTARGUMENT\"\r\n"
"\r\n"
"\r\n"
"-----------------------------7dc3057190256\r\n"
"Content-Disposition: form-data; name=\"__LASTFOCUS\"\r\n"
"\r\n"
"\r\n"
"-----------------------------7dc3057190256\r\n"
"Content-Disposition: form-data; name=\"__VIEWSTATE\"\r\n"
"\r\n"
"/wEPDwUKMTE2NTAxMzAyNw9kFgJmD2QWAgIFDxYCHgdlbmN0eXBlBRNtdWx0aXBhcnQvZm9ybS1kYXRhFjwCAg8WAh4HVmlzaWJsZWdkAgQPFgIfAWgWAmYP"
"ZBYCAgEPZBYCZg8PFgIfAWhkZAIFDxYCHgtfIUl0ZW1Db3VudAISFiRmD2QWAgIBDw8WAh4LTmF2aWdhdGVVcmwFQFxccXVpbGxjb3JwLmNvbVxxdWlsbHNo"
"YXJlXGRhc2hfYXBwXEN1c3RvbWVyIENvbW1lbnQgKFF1aWxsKS5vZnRkFgJmDxUBGEN1c3RvbWVyIENvbW1lbnQgKFF1aWxsKWQCAQ9kFgICAQ8PFgIfAwU8"
"XFxxdWlsbGNvcnAuY29tXHF1aWxsc2hhcmVcZGFzaF9hcHBcRFNTIENhbGxiYWNrIChRdWlsbCkub2Z0ZBYCZg8VARREU1MgQ2FsbGJhY2sgKFF1aWxsKWQC"
.........................
....................................
...................................
"-----------------------------7dc3057190256\r\n"
"Content-Disposition: form-data; name=\"ctl00$MainContent$hdndisAcc\"\r\n"
"\r\n"
"\r\n"
"-----------------------------7dc3057190256--\r\n", STRING_COMPLETE,
"multipart/form-data; boundary=---------------------------7dc3057190256", "Sales")


Waiting for you reply


Post Extras: Print Post   Remind Me!   Notify Moderator  
gardner
Newbie


Reged: 12/16/11
Posts: 2
Loc: Ontario
Re: Customization of script in WebpagesubmitBin() [Re: PrasadNew]
      #699133 - 02/21/12 12:44 PM

Theoretically, if the value of a field is set in the HTML form, then you can re-submit that value using the <USE_HTML_VAL> tag.

I have found that while this works with conventional form submissions, it does not work with WebPageSubmitFileUpload().

Is the correct value of "__VIEWSTATE" appearing in your HTML? Or is it generated by js or something?

What if you define the form like this and just use a conventional form submit?

Code:
 FOOBAR_FORM:
:
"__LASTFOCUS" := "",
"__VIEWSTATE" := "" <USE_HTML_VAL>,
:



--------------------
Gardner


Post Extras: Print Post   Remind Me!   Notify Moderator  
PrasadNew
Newbie


Reged: 03/21/10
Posts: 6
Re: Customization of script in WebpagesubmitBin() [Re: gardner]
      #699171 - 02/21/12 10:57 PM

Hi All,

Here, after parsing the VIEWSTATE(which is generated by JS), i am using that value inside WebPageSubmitBin().
Here i do have some concerns as follow

1.How to convert TEXT to HEXADECIMAL format?

2. Should we convert the value of VIEWSTATE to Hexadecimal data inside WebPageSubmitBin()?? If so, then which function i have to use???

3. What is the difference between functions like WebFormPostBin() and WebPageSubmitBin()??

4. How can i know whether the Viewstate is in Hexadecimal form or not??

Edited by PrasadNew (02/22/12 02:38 AM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
arun55303
Newbie


Reged: 09/21/12
Posts: 4
Re: Customization of script in WebpagesubmitBin() [Re: gardner]
      #716860 - 09/23/12 01:18 AM

Hi,
Can you please help me how to customize the values of the file from the webpagesubmitbin to WebPageSubmitFileUpload??

WebPageSubmitBin("StructuredPOUploadsForm", "-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"buttonName\"\r\n"
"\r\n"
"UploadFile\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"PaymentDataFilePath\"; filename=\"PO-AF-100-LINES-USER1.csv\"\r\n"
"Content-Type: application/vnd.ms-excel\r\n"
"\r\n"
"PO Number,PO Type,Issue Date,Currency,Amount,Seller Name,Incoterm,Incoterm Loc,Latest Ship Date,Partial Ship,Goods Desc,"
"BUD1,BUD2,BUD3,BUD4,BUD5,BUD6,BUD7,BUD8,BUD9,BUD10,SUD1,SUD2,SUD3,SUD4,SUD5,SUD6,SUD7,SUD8,SUD9,SUD10,Line Item No.,Unit"
" Price,UOM,Qty,QVP,PUD1,PUD2,PUD3,PUD4,PUD5,PUD6,PUD7\r\n"
"POALL-100-AX2100001,INT,20/6/2012,AUD,400,Seller1,FOB,London,22/6/2012,N,Description1,Bud1,Bud2,Bud3,Bud4,Bud5,Bud6,Bud7"
",Bud8,Bud9,Bud10,Sud1,Sud2,Sud3,Sud4,Sud5,Sud6,Sud7,Sud8,Sud9,Sud10,POALL-100-AX2100001,10,Pcs,40,0.1,Pud1,Pud2,Pud3,Pud"
"4,Pud5,Pud6,Pud7\r\n"
"POALL-100-AX2100002,INT,20/6/2012,AUD,400,Seller1,FOB,London,22/6/2012,N,Description1,Bud1,Bud2,Bud3,Bud4,Bud5,Bud6,Bud7"
",Bud8,Bud9,Bud10,Sud1,Sud2,Sud3,Sud4,Sud5,Sud6,Sud7,Sud8,Sud9,Sud10,POALL-100-AX2100001,10,Pcs,40,0.1,Pud1,Pud2,Pud3,Pud"
"4,Pud5,Pud6,Pud7\r\n"
"POALL-100-AX2100003,INT,20/6/2012,AUD,400,Seller1,FOB,London,22/6/2012,N,Description1,Bud1,Bud2,Bud3,Bud4,Bud5,Bud6,Bud7"
",Bud8,Bud9,Bud10,Sud1,Sud2,Sud3,Sud4,Sud5,Sud6,Sud7,Sud8,Sud9,Sud10,POALL-100-AX2100001,10,Pcs,40,0.1,Pud1,Pud2,Pud3,Pud"
"4,Pud5,Pud6,Pud7\r\n"
"POALL-100-AX2100004,INT,20/6/2012,AUD,400,Seller1,FOB,London,22/6/2012,N,Description1,Bud1,Bud2,Bud3,Bud4,Bud5,Bud6,Bud7"
",Bud8,Bud9,Bud10,Sud1,Sud2,Sud3,Sud4,Sud5,Sud6,Sud7,Sud8,Sud9,Sud10,POALL-100-AX2100001,10,Pcs,40,0.1,Pud1,Pud2,Pud3,Pud"
"4,Pud5,Pud6,Pud7\r\n"
"POALL-100-AX2100005,INT,20/6/2012,AUD,400,Seller1,FOB,London,22/6/2012,N,Description1,Bud1,Bud2,Bud3,Bud4,Bud5,Bud6,Bud7"
",Bud8,Bud9,Bud10,Sud1,Sud2,Sud3,Sud4,Sud5,Sud6,Sud7,Sud8,Sud9,Sud10,POALL-100-AX2100001,10,Pcs,40,0.1,Pud1,Pud2,Pud3,Pud"
"4,Pud5,Pud6,Pud7\r\n"
"POALL-100-AX2100006,INT,20/6/2012,AUD,400,Seller1,FOB,London,22/6/2012,N,Description1,Bud1,Bud2,Bud3,Bud4,Bud5,Bud6,Bud7"
",Bud8,Bud9,Bud10,Sud1,Sud2,Sud3,Sud4,Sud5,Sud6,Sud7,Sud8,Sud9,Sud10,POALL-100-AX2100001,10,Pcs,40,0.1,Pud1,Pud2,Pud3,Pud"
"4,Pud5,Pud6,Pud7\r\n"
"POALL-100-AX2100007,INT,20/6/2012,AUD,400,Seller1,FOB,London,22/6/2012,N,Description1,Bud1,Bud2,Bud3,Bud4,Bud5,Bud6,Bud7"
",Bud8,Bud9,Bud10,Sud1,Sud2,Sud3,Sud4,Sud5,Sud6,Sud7,Sud8,Sud9,Sud10,POALL-100-AX2100001,10,Pcs,40,0.1,Pud1,Pud2,Pud3,Pud"
"4,Pud5,Pud6,Pud7\r\n"
"\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"PODefinitionName\"\r\n"
"\r\n"
"oRBm3ybWqpgRNuDro3ihkg==\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"POUploadDataOption\"\r\n"
"\r\n"
"G\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"POUploadInstrOption\"\r\n"
"\r\n"
"IMP_DLC\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"POUploadGroupingOption\"\r\n"
"\r\n"
"U\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"Workflow\"\r\n"
"\r\n"
"xk0DijJFTtviSImvPSM+kg==\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"select\"\r\n"
"\r\n"
"0\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"ni\"\r\n"
"\r\n"
"-1306226790\r\n"
"-----------------------------41184676334--\r\n", STRING_COMPLETE,
"multipart/form-data; boundary=---------------------------41184676334", "POStructuredFileUploadServlet.jsp"); // Form 1


I have done for file name and button name but im not getting how to pass the values in the below part of the form..

"Content-Disposition: form-data; name=\"PODefinitionName\"\r\n"
"\r\n"
"oRBm3ybWqpgRNuDro3ihkg==\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"POUploadDataOption\"\r\n"
"\r\n"
"G\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"POUploadInstrOption\"\r\n"
"\r\n"
"IMP_DLC\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"POUploadGroupingOption\"\r\n"
"\r\n"
"U\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"Workflow\"\r\n"
"\r\n"
"xk0DijJFTtviSImvPSM+kg==\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"select\"\r\n"
"\r\n"
"0\r\n"
"-----------------------------41184676334\r\n"
"Content-Disposition: form-data; name=\"ni\"\r\n"
"\r\n"
"-1306226790\r\n"
"-----------------------------41184676334--\r\n", STRING_COMPLETE,
"multipart/form-data; boundary=---------------------------41184676334",


Can anyone help me!! arun55303@gmail.com
arun55303@gmail.com


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 5 anonymous users are browsing this forum.

Moderator:  AJ, jamesso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 3565

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5