Forum Discussion

Bramb1's avatar
Bramb1
New Contributor
6 years ago

how to capture a part of wndCaption text

Hi,

 

I need to “copy” the contract number for later use in the testscript.

 

How do I make a variable of the wndcaption text, but on the the GABV.1900176 (which is changed everytime I run a test)

 

Kind regards

 

Bram

  • Hi Bram,

     

    I would use regular expression to extract a sequence of digits between two dots.

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Bram,

     

    I would use regular expression to extract a sequence of digits between two dots.

     

    • Bramb1's avatar
      Bramb1
      New Contributor

      I have added a code snippet :  KeywordTests.aanmaken_en_registreren_contract.Variables.WndCaption = aqString.SubString( KeywordTests.aanmaken_en_registreren_contract.Variables.WndCaption, 50,7);

       

      this worked!

    • Bramb1's avatar
      Bramb1
      New Contributor

      Is there anyway i can do this in a keyword test?