Skip to content

Commit

Permalink
when adding a firefox extension, check for the id in the attribute too
Browse files Browse the repository at this point in the history
Fixes Issue SeleniumHQ#5978
  • Loading branch information
lukeis committed Sep 10, 2014
1 parent accb300 commit 0e4a981
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions py/selenium/webdriver/firefox/firefox_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ def get_text(element):
entry = node.nodeName.replace(em, "")
if entry in details.keys():
details.update({entry: get_text(node)})
if details.get('id') is None:
for i in range(description.attributes.length):
attribute = description.attributes.item(i)
if attribute.name == em + 'id':
details.update({'id': attribute.value})
except Exception as e:
raise AddonFormatError(str(e), sys.exc_info()[2])

Expand Down

0 comments on commit 0e4a981

Please sign in to comment.