Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

fix: get filePaths #1521

Merged
merged 6 commits into from
Aug 15, 2020
Merged

fix: get filePaths #1521

merged 6 commits into from
Aug 15, 2020

Conversation

KazuCocoa
Copy link
Member

closes https://github.com/appium/appium-desktop/issues/1492

Not sure since when, but showOpenDialog should be then syntax.
this.handleSetType is always null, so cannot bind.

After:
image

https://github.com/electron/electron/blob/v6.0.0/docs/api/dialog.md#dialogshowopendialogbrowserwindow-options

onClick={() => this.getLocalFilePath((filepath) => onSetCapabilityParam(filepath[0]))} />;
onClick={async () => {
const filePath = await this.getLocalFilePath();
onSetCapabilityParam(filePath ? filePath : currentPath) ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be simplified to filePath || currentPath

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of calling onSetCapabilityParam with currentPath argument?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep the current inputted path when file browsing was cancelled. Previous filepath behaviour (before #1492) also behaved as the same.

@KazuCocoa KazuCocoa merged commit 23ebafb into appium:master Aug 15, 2020
@KazuCocoa KazuCocoa deleted the fix-filepath branch August 15, 2020 23:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PATH selection for APP while setting desired capabilities its not working from 1.16.0/1.17.0/1.18.0 beat1
2 participants