Results 1 to 2 of 2
  1. #1
    gecko753 is offline Member
    Join Date
    Nov 2009
    Posts
    1
    Rep Power
    0

    Default [SELENIUM] Retrieve the value of a hidden input type

    I must make Selenium testing to check if the application works properly. I managed to get them all but one for which I must recover the value of a hidden input type.

    Here is the html code generated:
    XML Code:
    <form action="my.do" method="post" name="myForm">
    ...
    <input type="hidden" value="2616950" name="id"/>
    ...
    </form>
    Here is the code that does not work:
    Java Code:
    String myId  = selenium.getValue("name='id'");
    Here is the error returned:
    Java Code:
    10:49:30.831 INFO - Command request: getValue[name='id', ] on session 9dbb91fe3e914b778d07fc4ce97f53bd
    10:49:30.865 INFO - Got result: ERROR: Element name='id' not found on session 9dbb91fe3e914b778d07fc4ce97f53bd

    If someone has an idea,

    Thanks.

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Try

    Java Code:
    String myId = selenium.getValue("name");
    instead.



    r035198x(<---knows ziltch about selenium and is therefore shooting in the dark.

Similar Threads

  1. retain value of input type file in a jsp file while being dynamically generated
    By nidhi c in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2009, 02:21 AM
  2. Hidden Button after paint()
    By MuslimCoder in forum New To Java
    Replies: 5
    Last Post: 09-14-2009, 05:52 PM
  3. Replies: 0
    Last Post: 07-23-2009, 06:50 PM
  4. Input type Check box
    By jeeva in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 02-17-2009, 02:36 PM
  5. Input type Check box
    By jeeva in forum Advanced Java
    Replies: 1
    Last Post: 02-05-2009, 04:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •