In my Selenium IDE script, I need to check for an error state.
This error state is visually indicated on the page by a select control’s background turning to a light red color.
The xpath for the select control is:
.//*[@id='tab-PersonnelDetailPeriod1-div']/div[3]/table/tbody/tr[2]/td[2]/div/select
The HTML for that select control is:
select style="background-color:#FFD5D5" tabindex="0" name="newBudgetLineItems[0].costElement"
I would like to store the background-color in a variable and then use the gotoIf command from the Flow Control plugin to execute additional steps if the variable holding the color is FFD5D5.
Is this possible within Selenium IDE?
Thanks in advance to anyone who assists.
EDIT: another approach could be locating any select element which has a background-color style, as all other selects on the page do not have any background color specified.
Besides the xpath locator
//select[@style='background-color:#FFD5D5'],you can try
verifyAttributeor maybe JavaScript
window.getComputedStyle(*element*,null).getPropertyValue('backgroundColor');.