galen icon indicating copy to clipboard operation
galen copied to clipboard

Problem with ignore-objects in spec

Open dhapolapankaj opened this issue 7 years ago • 2 comments

Hello Ivan and Team,

I found below issue with "ignore-objects" in spec file

  1. The ignore-objects do not throw error, if the XPath mentioned is not found in HTML. I think at least a warning message could be helpful in debugging (It took me 2 days to figure out the real cause)
  2. It do not work in frame, though I tried switching the frame

Below is the part of my spec file

galen-ignore-object-issue

I also tried to switch the frame and updated the XPath as ".//div[@id='plan']"

The ignore-objects functionality is quite a great and I think very important feature in Galen Framework, since it gives you an ability to ignore some part of HTML (which has dynamic content) by providing locator.

Please help me If I am doing something wrong here.

Regards PD

dhapolapankaj avatar Jul 08 '17 12:07 dhapolapankaj

@ishubin do we have any workaround to handle iframe?

dhapolapankaj avatar Jul 14 '17 11:07 dhapolapankaj

@dhapolapankaj Hi, it is not possible to reference an element via iframe. The only way to test something within the iframe is to use component spec with frame setting. http://galenframework.com/docs/reference-galen-spec-language-guide/#Framesupport

As for warnings, there is no way to propagate warnings in html reports as there is no support for that. The only support for warnings we have - is to report the complete check as a warning. But this is not what you really want here.

ishubin avatar Jul 19 '17 11:07 ishubin