18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

extract all form elements automatically

stefanxstefanx Members
edited November -1 in Sahi - Open Source
I need to assign datasets (from a file/DB) to form elements where many exist (ca. 100). Therefore it would be useful to have Sahi extracting all (!) form elements to the script. Then I could edit the script manually and assign the variables to the form elements.

Is it possible to get Sahi to extract all form elements at once?

Comments

  • Hi,

    Please elaborate on this. Can you explain your requirement with an example. :)

    Regards,
    Pankaj.
  • Basically I am looking for an easy way to create a data driven test case. The usual way I know is to record a test case and afterwards manually replace the entered values with variables. If the test case includes forms with several dozen check boxes and other form elements this is a quite expensive process. Thus I am looking for a more easy solution.

    To extract all form elements automatically would remove the need to click all form elements manually with the mouse while recording. Still all elements need to be modified in the script as described above. I assume to write a function to extract all elements is not so complicated.

    A better solution would be to have a list of data fields (variables) in a separate window and assign them to the certain form elements by drag and drop. I expect such a solution requires some effort to implement but would be easier to execute.

    I appreciate any hint of you to solve the task.
  • Hi,

    Please browse through what Stringy has suggested. I just happened to go through it. It will surely help solving your problem.

    Regards,
    Pankaj.
  • Here's an example from the Sahi webpage. Combine it with the link I posted above and you should have a good start.

    http://sahi.co.in/w/for-loops

    and that link again

    http://www.w3schools.com/htmldom/dom_obj_form.asp
  • Thank you for your support. I will read the referenced addresses and try to build a small tool for my needs.
Sign In or Register to comment.