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

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

Merged

Conversation

huzaifaiftikhar
Copy link
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
Member

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

@KazuCocoa
Copy link
Member

btw, please sign the CLA

@huzaifaiftikhar
Copy link
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
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
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.

@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
2 participants