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

feat: add sessionName in the attach to session dropdown#1694

Merged
KazuCocoa merged 5 commits into
appium:1.20from
huzaifaiftikhar:add_session_name_in_attach_to_session
Mar 17, 2021
Merged

feat: add sessionName in the attach to session dropdown#1694
KazuCocoa merged 5 commits into
appium:1.20from
huzaifaiftikhar:add_session_name_in_attach_to_session

Conversation

@huzaifaiftikhar
Copy link
Copy Markdown
Contributor

@huzaifaiftikhar huzaifaiftikhar commented Feb 12, 2021

Once #1693 is merged users will be able to view the list of running sessions in the attach to session window. It is difficult to filter the sessions via the session-id, therefore, adding the sessionName (if present) to the list of importantCaps.

Screenshot from the dev build
sessionName in attach to session list

@KazuCocoa
Copy link
Copy Markdown
Member

What's the sessionName?
It seems the value is not a regular Appium stuff.

@KazuCocoa
Copy link
Copy Markdown
Member

btw, please sign the CLA

@huzaifaiftikhar
Copy link
Copy Markdown
Contributor Author

What's the sessionName?
It seems the value is not a regular Appium stuff.

Yes, it's not an appium capability, this capability is specific to BrowserStack by which we allow the user's to give a meaningful name to their sessions.
Would it possible to accept this PR as a feature request or do you think otherwise?

@KazuCocoa
Copy link
Copy Markdown
Member

Could it be possible to build your own custom AD for your platform with this change?

It would be better to define a new module or method to allow a vendor to customize the naming for them.
I don't check around the code well, but something like:

function formatCaps (vendor, caps) {
    if (vendor === 'browserstack') {
        return formatCapsBrowserStack(caps)
    }
    // ...
}

function formatCapsBrowserStack (caps) {
    // do your own logic
}

Or extract the place as a different module.

@huzaifaiftikhar
Copy link
Copy Markdown
Contributor Author

@KazuCocoa can you re-review? I've created the method formatCapsBrowserstack and other cloud providers can change the formatting as per their choice using a similar approach.

Comment thread app/renderer/components/Session/AttachToSession.js Outdated
Comment thread app/renderer/components/Session/AttachToSession.js
@KazuCocoa KazuCocoa merged commit 413271f into appium:1.20 Mar 17, 2021
@huzaifaiftikhar huzaifaiftikhar deleted the add_session_name_in_attach_to_session branch March 17, 2021 06:25
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.

2 participants