Change the reporting level of Validate.Attribute false?
Posted: Tue Dec 11, 2012 10:51 pm
Is ther any way to force a Validate.Attribute failure into a warning?
Here's what I'm using it for. I need to click a specific object depending on how a screen is rendered. All the objects in question Exist (which is why I can't use Validate.Exist) but they are visible or not, depending on what screen I'm on.
I'm validating the visible attribute is true in order to figure out what screen was rendered and click the button.
if (validate.Attribute(repo.button1, "Visible", "True", "message", false) == true){
click button1
}else if(validate.Attribute(repo.button2, "Visible", "True", "message", false) == true){
click button 2
}
else {do something else...}
So if I'm on the screen with button 1 then my script will pass but if i'm on the screen with button 2 the validation looking for button1 will fail which causes the entire test to fail.
Is there a way to change the reporting level for that particular validation statement to a warning so the step doesn't fail? Or else, Is there any way I can force the test case to Pass?
There might be another way to approach this that I'm not thinking of....
Thanks
Here's what I'm using it for. I need to click a specific object depending on how a screen is rendered. All the objects in question Exist (which is why I can't use Validate.Exist) but they are visible or not, depending on what screen I'm on.
I'm validating the visible attribute is true in order to figure out what screen was rendered and click the button.
if (validate.Attribute(repo.button1, "Visible", "True", "message", false) == true){
click button1
}else if(validate.Attribute(repo.button2, "Visible", "True", "message", false) == true){
click button 2
}
else {do something else...}
So if I'm on the screen with button 1 then my script will pass but if i'm on the screen with button 2 the validation looking for button1 will fail which causes the entire test to fail.
Is there a way to change the reporting level for that particular validation statement to a warning so the step doesn't fail? Or else, Is there any way I can force the test case to Pass?
There might be another way to approach this that I'm not thinking of....
Thanks