Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to select WebFile element
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Dear All,

When i try to take spy for Browse button it select whole text of logofilename & browse button together, i am unable to take spy for separate Browse button. I write descriptive programming for click on Browse button but i am unsuccessfull, Can anybosy just let me know how would i click on Browse so it open a window to select(Browse) file.

My code is:

Code:
Public Function ClickBrowseWebFile()

Dim NumberOfEdits, webElementToSearch
webElementToSearch="bannerlogo"
Set oDesc = Description.Create
oDesc("html tag").Value = "INPUT"
oDesc("micclass").Value = "WebFile"
oDesc("name").Value = "bannerlogo"

Set EditCollection = Browser("title:=Publish").Page("title:=Publish.*").ChildObjects(oDesc)

NumberOfEdits = EditCollection.Count
MsgBox(NumberOfEdits)

For i = 0 To NumberOfEdits - 1
    If EditCollection(i).GetROProperty("name") = webElementToSearch Then
      EditCollection(i).Click
    End If

Next

End Function

Please help me out, hoping for cooperation

Thanks

Mahesh
Hello All,

I got the solution,need for some setting

1. Select Tools>>Web Event Recording Configuration>>Custom Settings

2. On the left hand side, select WebFile in the Standard Web Objects branch of the Objects pane

3. Select Event>>Add>>onclick

4. Select Always in the Listen column for this event

good luck Smile


Thanks

Mahesh


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,
In this situation "Logo File Name" is acting as Edit field so automatically whatever the file name u specified which is using that and pefroming the action this is the default behavior of these kind of Browse buttions

Regards,
Venkat.Batchu
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello Venkat/All,

I got the solution,need for some setting

1. Select Tools>>Web Event Recording Configuration>>Custom Settings

2. On the left hand side, select WebFile in the Standard Web Objects branch of the Objects pane

3. Select Event>>Add>>onclick

4. Select Always in the Listen column for this event

good luck


Thanks

Mahesh
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Instead of clicking on browse button you can specify the file path to be selected
Code:
Browser("XXX").Page("XXX").WebFile("Filebrowser").Set "c:\a1.txt"
The file would get set to the fileld
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
(12-03-2009, 09:34 AM)upadhyay40 Wrote: Hello Venkat/All,

I got the solution,need for some setting

1. Select Tools>>Web Event Recording Configuration>>Custom Settings

2. On the left hand side, select WebFile in the Standard Web Objects branch of the Objects pane

3. Select Event>>Add>>onclick

4. Select Always in the Listen column for this event

good luck


Thanks

Mahesh

I've also done this setting in UFT_12.02, but even I got same problem.
Please help.
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
I've also done this setting in UFT_12.02, but even I got same problem.
Please help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  webfile web object not identified at runtime in a java application saila123 1 2,811 02-11-2015, 08:23 PM
Last Post: Kirill
  Date Picker Issue - Unable to select date link dynamically rajkumarsm 1 5,162 09-20-2014, 09:31 AM
Last Post: rajkumarsm
  Unable to select Multiple OracleTextFields by Holding Ctrl Button Raghava M 0 1,861 07-04-2014, 01:40 PM
Last Post: Raghava M
  QTP identifying WebList as WebEdit and an Element passion77 3 8,429 01-27-2014, 10:21 PM
Last Post: supputuri
  Unable to select an item from weblist and unable to enter text in edit box estherindu 5 9,561 05-15-2012, 12:07 AM
Last Post: viswa

Forum Jump:


Users browsing this thread: 1 Guest(s)