Thanks:  0
Likes:  0
Dislikes:  0

1. ## Webtable Problem

Hi all,
This is prasanth.k am having one assignment in makemy trip website when we give to and fro city names the list of all flights comes for example if 102 flights are there in my scenario my aim is to get flight with lowest fare from all flights all flight fares are in differnt cells in a webtable.i got flight fares by this code

SystemUtil.Run "IEXPLORE.exe","http://flights.makemytrip.com"

Browser("Flights, Cheap Hotels").Page("Flights, Cheap Hotels").Link("Search for Flights").Click
Browser("Flights, Cheap Hotels").Page("Flights, Cheap Hotels").Link("No, continue with one-way").Click
Browser("Flights, Cheap Hotels").Page("Flt Select Departure").WebElement("See All 106 flights").Click

rows=Browser("Flights, Cheap Hotels").Page("Flt Select Departure_2").WebTable("Jet LiteS2-244").RowCount
MsgBox rows
For i=1 to rows
temp=Browser("Flights, Cheap Hotels").Page("Flt Select Departure_2").WebTable("Jet LiteS2-244").GetCellData(i,5)
MsgBox temp
spl=Split(temp,"(")
var=spl(0)
MsgBox var
rep=Replace(var," ","")
MsgBox rep
spl1=Split(rep,".")
var1= spl1(1)
If Then
End If
Next

now finally i have to get msgbox of lowest fare flight name am not gettting idea please help me as soon as possible.
Thanks
prasanth.k <font class="small">Code:</font><hr /><pre> </pre><hr /> [img]/images/graemlins/frown.gif[/img]

2. ## Re: Webtable Problem

what is the temp value you are getting?

use 'print temp' and post it.

3. ## Re: Webtable Problem

What is the temp value?

Try using a ArrayList object, insert all the values obtained from each row into arraylist and then use the sort method.

set objArrayList = CreateObject("System.Collections.ArrayList")

For i=1 to rows
temp=Browser("Flights, Cheap Hotels").Page("Flt Select Departure_2").WebTable("Jet LiteS2-244").GetCellData(i,5)
MsgBox temp
Next
objArrayList.Sort()

Just check this, i hope temp is a numeric value enclosed/represented as string and hence requires a conversion.

4. ## Re: Webtable Problem

[ QUOTE ]

set objArrayList = CreateObject("System.Collections.ArrayList")

For i=1 to rows
temp=Browser("Flights, Cheap Hotels").Page("Flt Select Departure_2").WebTable("Jet LiteS2-244").GetCellData(i,5)
MsgBox temp
Next
objArrayList.Sort()

[/ QUOTE ]

Ganesh its a good solution dealing with arrays.

5. ## Re: Webtable Problem

Thank You

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.