Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to select the number from the web element?
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi,
I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table.

I dont need the string Bed:4,I would like to get only the no 4.
How can I get it?
Even though I highlight only 4,It is seleting the full value "bed 4".

Same thing happend for second webelement Bath:2 Full,1 partial
I need only the No 2.

I used the following to split
MyArray = Split(UIBathResult, " ", -1, 1)
But it is giving the value
My Array(0)=Bath:2full,1Partial

I need the only the nos for further comparision.Any help?

I attached my testing page which has the web element bed and bath.
Thanks
Uma




Attached Files
.doc   resultpage.doc (Size: 521 KB / Downloads: 103)
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
Uma, try this

Code:
for i=1 to len(UIBathResult)
if isnumeric(mid(UIBathResult,i,1))=true
num=mid(UIBathResult,i,1)
exit for
end if
'num has the value
Reply
#3
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Raj,

Thanks for the code.I got an idea from your reply.
I am using the following code and I got the result
Code:
MyString=len(UIBedResult)
Print MyString
Temp=Split(UIBedResult,"",-1,1)
Value_0=Temp(0)
Bed=mid(Value_0,5,1)
Print Bed
Thanks for your time.
Thank You.
Uma
Reply
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
ok, glad to know that
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Web Object Unique ID Number zunebuggy 0 1,579 07-10-2017, 05:37 PM
Last Post: zunebuggy
  Page element keep changing chong67 4 4,691 11-08-2016, 09:17 PM
Last Post: Paul Rammone
  Choosing element from array marvson 1 1,945 06-29-2016, 02:55 PM
Last Post: Ankesh
  Web Element: Not able to select value from drop down in Web Element. Rajeev 4 5,351 08-04-2015, 06:03 PM
Last Post: kbhargava505
  VB Script to count number of links in a web page. Suma Parimal 4 25,377 07-01-2015, 12:59 PM
Last Post: govind

Forum Jump:


Users browsing this thread: 1 Guest(s)