Geeks Talk

Prepare for your Next Interview




Junk Characters entered in HtmlTextField (eg:- Username Field)

This is a discussion on Junk Characters entered in HtmlTextField (eg:- Username Field) within the SilkTest forums, part of the Software Testing category; Hi I observed that the silktest enters junk characters into the HtmlTextfield on SetText() calls. Mostly these junk characters are from the clipboard (i.e if you copy any text ...


Go Back   Geeks Talk > Software Testing > SilkTest

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-17-2008
Junior Member
 
Join Date: May 2008
Posts: 25
Thanks: 1
Thanked 2 Times in 2 Posts
sabariish is on a distinguished road
Junk Characters entered in HtmlTextField (eg:- Username Field)

Hi

I observed that the silktest enters junk characters into the HtmlTextfield on SetText() calls. Mostly these junk characters are from the clipboard (i.e if you copy any text while your script is in progress or otherwise and at any point of time the script needs to enter some text in a htmltextfield, the silktest pastes the text in clipboard to the textfield).

Any workaround available???

Regards
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-20-2008
Junior Member
 
Join Date: May 2008
Posts: 25
Thanks: 1
Thanked 2 Times in 2 Posts
sabariish is on a distinguished road
Re: Junk Characters entered in HtmlTextField (eg:- Username Field)

Hi all

For those who have experienced this issue:-

We contacted Borland regarding this issue and they provided a workaround i.e when and where we are typing any text in a textfield before typing the text clear the contents in the clipboard.
Something like -
clipboardContents = [STRING]Clipboard.GetText()
[-] if(!(clipboardContents==""))
[ ] Clipboard.SetText({})

and also for logging into the application using username an password - we did something like:-
[ ] Clipboard.SetText({username})
[ ] Applicationwindow.HtmlTextField(USERNAME_FIELD).SetFocus()
[ ] Applicationwindow.HtmlTextField(USERNAME_FIELD).Click()
[ ] Applicationwindow.HtmlTextField(USERNAME_FIELD).TypeKeys("")
[ ] Applicationwindow.HtmlTextField(USERNAME_FIELD).TypeKeys("")
[ ] Applicationwindow.HtmlTextField(USERNAME_FIELD).TypeKeys("")

i.e we paste ("") the contents in the clipboard to the htmltextfield..


But somehow for our disguise the clipboard workaround did not help us with the random character issue.
We still got the random characters typed into the textfields or the URL's...

One day i just came across an interesting behavior was observed for TypeKeys()

See the below scenario for TypeKeys() –
1. Take a HtmlTextField and try to type some text into it using typekeys().
2. When the script is typing the value, tab the screen to silktest and observe
The text is typed in the silktest work area instead of the text field. Sometimes the Silktest does not respond until the whole text is typed in.

So i feel may be the text is typed in dur to this behaviour in typekeys().

Hence i feel a possible workaround for this is to use SetText() method. and before calling this method just call a Cleartext() method to make sure there is no pre-exixting text.
Hope this fixes our issues as of now we did not encounter any troubles fingers crossed.

If anybody else have a better idea or workaround, then revert back to this post.


Thanks and Regards
Sabarish
Reply With Quote
Reply

  Geeks Talk > Software Testing > SilkTest


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
junk--pl ignore meghag_24 SAP R/3 0 05-15-2008 08:10 AM
Add 70000 characters in a text box priyaspve WinRunner 0 09-20-2007 04:43 PM
Prompt the username and password Geek_Guest Networking 1 04-02-2007 01:37 AM
rudhra entered...... rudhra304 Get Together 7 01-22-2007 01:29 AM
To handle foreign characters janelyn Web Design 0 08-03-2006 03:08 PM


All times are GMT -4. The time now is 06:24 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved