Closed hekra01 closed 9 years ago
Rectangle { id: button width: 20 }
wd.get("file:///home//user/qtwebdriver/b.qml") elem = wd.find_element_by_xpath("//Rectangle") v = elem.get_attribute("width")
[FINE]: QML executor for view(2a3f361496c2e10c8c32a97aec6768d0) [FINE]: Command finished (/session/c453849c76f64f66d9d9f80ffe2cd82d/element/4c5dfaf8b1721bba90e3508342b1d4f4/attribute/width) with response { "sessionId": "c453849c76f64f66d9d9f80ffe2cd82d", "status": 0, "value": 20 }
[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
string
int
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 https://github.com/cisco-open-source/qtwebdriver/commit/0db4bd3f5583a7900a49d8049a3746c39e47462c
The value for the integer shoud be returned as a
string
, not anint
as per W3C spec: https://w3c.github.io/webdriver/webdriver-spec.html#getelementattributeHowever, note that from the spec values retrieved with executeScript will keep their type: https://w3c.github.io/webdriver/webdriver-spec.html#executescript
fixed in https://github.com/cisco-open-source/qtwebdriver/commit/0db4bd3f5583a7900a49d8049a3746c39e47462c