简体   繁体   中英

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 ID attribute it will show that the ID is rad_button1 . However when the test is ran on TeamCity I look at the attributes for the same element and the ID attribute no longer has any ID.

Has anyone encountered this issue before?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM