Skip to content

Commit

Permalink
fix: Add accessible attribute to the xml tree in case of useJSONSource (
Browse files Browse the repository at this point in the history
#2484)

* Added accessible attribute to the xml tree in case of useJSONSource capability

With useJSONSource as false, source contains accessible attribute but with useJSONSource as true, it bypasses this.

* added missing comment
  • Loading branch information
swngarg-lt authored Oct 23, 2024
1 parent bdfbc27 commit e25ac81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/commands/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ const helpers = {
* ```js
* { isEnabled: '1',
* isVisible: '1',
* isAccessible: '1',
* frame: '{{0, 0}, {375, 667}}',
* children:
* [ { isEnabled: '1',
* isVisible: '1',
* isAccessible: '1',
* frame: '{{0, 0}, {375, 667}}',
* children: [],
* rect: { x: 0, y: 0, width: 375, height: 667 },
Expand Down Expand Up @@ -89,6 +91,7 @@ function getTreeForXML(srcTree) {
type: `XCUIElementType${element.type}`,
enabled: parseInt(element.isEnabled, 10) === 1,
visible: parseInt(element.isVisible, 10) === 1,
accessible: parseInt(element.isAccessible, 10) === 1,
x: rect.x,
y: rect.y,
width: rect.width,
Expand Down

0 comments on commit e25ac81

Please sign in to comment.