Skip to content

GetAttribute should return strings for native views #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hekra01 opened this issue Jun 3, 2015 · 0 comments
Closed

GetAttribute should return strings for native views #8

hekra01 opened this issue Jun 3, 2015 · 0 comments
Assignees
Labels

Comments

@hekra01
Copy link
Contributor

hekra01 commented Jun 3, 2015

  • With such qml:
Rectangle {
    id: button
    width: 20
}
  • And this test
wd.get("file:///home//user/qtwebdriver/b.qml")
elem = wd.find_element_by_xpath("//Rectangle")
v = elem.get_attribute("width")
  • observed server reply
[FINE]: QML executor for view(2a3f361496c2e10c8c32a97aec6768d0)
[FINE]: Command finished (/session/c453849c76f64f66d9d9f80ffe2cd82d/element/4c5dfaf8b1721bba90e3508342b1d4f4/attribute/width) with response {
   "sessionId": "c453849c76f64f66d9d9f80ffe2cd82d",
   "status": 0,
   "value": 20
}
  • expected server reply
[FINE]: QML executor for view(2a3f361496c2e10c8c32a97aec6768d0)
[FINE]: Command finished (/session/c453849c76f64f66d9d9f80ffe2cd82d/element/4c5dfaf8b1721bba90e3508342b1d4f4/attribute/width) with response {
   "sessionId": "c453849c76f64f66d9d9f80ffe2cd82d",
   "status": 0,
   "value": "20"
}

The value for the integer shoud be returned as a string, not an int as per W3C spec: https://w3c.github.io/webdriver/webdriver-spec.html#getelementattribute

However, note that from the spec values retrieved with executeScript will keep their type: https://w3c.github.io/webdriver/webdriver-spec.html#executescript

fixed in 0db4bd3

@hekra01 hekra01 self-assigned this Jun 3, 2015
@hekra01 hekra01 closed this as completed Jun 3, 2015
@hekra01 hekra01 added the bug label Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant