Thank you,now its working fine...
On Wednesday, February 18, 2015 at 12:13:46 PM UTC+5:30, Subbarao G wrote:
>
> The reason you get that error is your columnvalue is not the string
>
> rows.get(9).getText().then(function(text) {
> console.log(text);
> var columnvalue1=text.trim();
> console.log(columnvalue1);
> });
>
>
> Should work.
>
> On Wednesday, February 18, 2015 at 10:17:04 AM UTC+5:30, Sujata Dwivedi
> wrote:
>>
>> Thank you for your answer i tried but i got error-
>> Object [object Object] has no method 'trim'
>> I used like this:
>>
>> var columnvalue=rows.get(9).getText();
>> var columnvalue1=columnvalue.trim();
>>
>> I am using protractor for testing angular js page.
>>
>>
>>
>> On Tuesday, February 17, 2015 at 8:16:28 PM UTC+5:30, Sander Elias wrote:
>>>
>>> Use trim().
>>>
>>> " blah ".trim() ==> "blah"
>>>
>>> Regards
>>> Sander
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.