Finding font-weight value for span[2] element in Selenium IDE -
is there way verify element 'adam slodowy' bold in selenium ide?
this fragment of site code:
...
<div class='thread-content-row.thread-content-row-1'> <div class='thread-content-row-left'> <div class='thread-content-row-right'> <div class='discussion-info'> <b>daria ogrodowska</b> <span>super</span> , <span>adam slodowy</span> </div> <div class="discussion-content"> bla bl balkjbasdfsdfsdfdsfsdf sdfsdf sdf sdf </div> </div> </div> i've tried utilize verifyeval command:
command: verifyeval
target: var elem = window.document.queryselector("div.thread-content-row.thread-content-row-1 > div.thread-content-row-right > div.discussion-info span"); window.getcomputedstyle(elem,null).getpropertyvalue("font-weight");
value: 700
but have no thought how in queryselector refer sec span - queryselector("div.thread-content-row.thread-content-row-1 > div.thread-content-row-right > div.discussion-info span[2]") doesn't work.
it much more practical human person check styles if bold bad , selenium wouldn't able tell if looked "bad" or not.
that beingness said, want utilize xpath query on one.
xpath=//span[contains(text(), 'adam slodowy') or if have more 1 of in web page.
xpath=//div[@class='discussion-info']/span[contains(text(), 'adam slodowy') the // indicates through web page element matches whatever follows. beneficial don't have include entire xpath fragile if of construction changes.
selenium-ide
No comments:
Post a Comment