Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Split a String
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Manish,
One slight chnage in above code is, I have not used below checkpoint.
Code:
'Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebElement("Frankfurt to New York").Output CheckPoint("Frankfurt to New York")

Below code is alos working for me, if use seprately.

But if it is implemented with above script, I am surprised it give inorrect result.
For details please see below Datatable I used.

Code:
DataTable("p_Item", dtGlobalSheet)-  For Fly From parameters.
DataTable("p_Item1", dtGlobalSheet)- For Fly To parameters.
datatable.Value("Select_a_Flight_MercuryOutput_Text_out",dtglobalsheet)
- Which give me run time output value.

Now if
Fly From = New York
Fly To= Paris.
I put it in text so
text= datatable.Value("Select_a_Flight_MercuryOutput_Text_out",dtglobalsheet) = "New York To Paris"

Its working upto this.
Now I used Split function to seprate " New York To Paris" using following split function.
Myarr=split(text,"TO")
When I used following function
msgbox Myarr(0)
It still displyed the whole text . i.e. "New York To Paris" instead it should only show New York
And msgbox Myarr(1) displayed error.

Can you please let me know why this is happening.

Simpley I want to verify that
Code:
a= x and b=y where
a= DataTable("p_Item", dtGlobalSheet
b=DataTable("p_Item1", dtGlobalSheet)
x=Myarr(0)
y=Myarr(1)
Reply


Messages In This Thread
Split a String - by sudhirzpatil - 12-23-2010, 07:26 PM
RE: Split a String - by sudhirzpatil - 12-23-2010, 09:39 PM
RE: Split a String - by manishbhalshankar - 12-24-2010, 10:03 AM
RE: Split a String - by sudhirzpatil - 12-24-2010, 11:10 AM
RE: Split a String - by manishbhalshankar - 12-24-2010, 11:20 AM
RE: Split a String - by sudhirzpatil - 12-24-2010, 11:37 AM
RE: Split a String - by sudhirzpatil - 12-26-2010, 09:39 AM
RE: Split a String - by UFTEnthusiast - 01-04-2011, 07:12 PM
RE: Split a String - by sreekanth chilam - 01-04-2011, 11:22 PM
RE: Split a String - by UFTEnthusiast - 01-05-2011, 03:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Split function in string nidhishnair 13 64,749 07-07-2020, 03:47 PM
Last Post: helmzshelmz
Question Split Function Chaithra N 0 1,182 12-18-2019, 11:33 AM
Last Post: Chaithra N
  Split a string with multiple delimiters in VBScript nandha 2 8,668 02-10-2018, 06:44 PM
Last Post: nandha
  Replace a string in a word document with another string rekha.naik 8 15,583 11-14-2013, 12:58 PM
Last Post: pranikgarg
  Split Function diya 2 5,798 11-28-2012, 08:49 PM
Last Post: diya

Forum Jump:


Users browsing this thread: 2 Guest(s)