HelpMePlz HelpMePlz - 10 months ago 51
HTML Question

html 'ID' attribute disappears

I am currently trying to test a website using selenium and when I run the tests locally on my computer the tests will pass however when I run the tests on TeamCity the tests will fail because they can't find an element with the specified id.

When the tests are ran they are testing the exact same HTML page, when they are running on my computer locally and I check the element for its

attribute it will show that the ID is
. However when the test is ran
on TeamCity I look at the attributes for the same element and the
attribute no longer has any ID.

Has anyone encountered this issue before?

Answer Source

The problem here was that IE9 was running in compatibility mode by default which we didnt know. So on the developers machine it was running ie9 normally and on the remote machine it was running IE9 in compatibility mode and this is what was causing the IDs to disappear.