Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to verify style attribute in Selenium IDE

I have the following code:

<div class="ui-multiselect-menu ui-widget ui-widget-content ui-corner-all ui-multiselect-single" style="width: 192px; top: 172px; left: 299.9px; display: none;">

how can i use verifyAttribute or any other command to validate that the style is display: none; ? the xpath that I have is /html/body/div[3]

like image 254
user2404845 Avatar asked Oct 21 '22 09:10

user2404845


2 Answers

You have to match your style attribute with xpath contains, for example //*[contains(@style,'display: none')] this means any element which has display: none. you can further refine it like //div[contains(@style,'display: none')]

like image 63
Laksitha Ranasingha Avatar answered Oct 24 '22 04:10

Laksitha Ranasingha


Better late then never...

Command: assertAttribute
Target: css=#div_id@style
Value: display: none

like image 32
user3303268 Avatar answered Oct 24 '22 02:10

user3303268