Monday, 15 February 2010

angularjs - Protactor - Finding CSS Value (specifically in a body tag) -



angularjs - Protactor - Finding CSS Value (specifically in a body tag) -

i have tag in app

<body id="ctl00_ctl00_body" menuopen="true">

i'm trying expect if menu true or false. right i've tried

var body = element(by.id('ctl00_ctl00_body')); expect(body.getcssvalue('menuopen').toequal('true'))

and getting error

typeerror: object [object object] has no method 'toequal'

thanks help! still new @ this. google'd lastly few days , couldn't find

a bracket misplaced in code.

expect(body.getcssvalue('menuopen')).toequal('true')

from jasmine documentation:

expectations built function expect takes value, called actual. chained matcher function, takes expected value.

in case matcher toequal

answering comment:

getting error unknownerror: unknown error: failed parse value of get_effective_style

menuopen not css value element attribute. have utilize getattribute instead of getcssvalue

expect(body.getattribute('menuopen')).toequal('true')

angularjs selenium-webdriver protractor

No comments:

Post a Comment