Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Upload files capability for Browserstack #1742

Open
mabouamer-93 opened this issue Sep 22, 2024 · 1 comment
Open

[Feature Request]: Upload files capability for Browserstack #1742

mabouamer-93 opened this issue Sep 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request triage needs to be looked at

Comments

@mabouamer-93
Copy link

Our team needs to upload files for test scenarios, we have investigated and found that SHAFT does not support this property.

Feature required:
It will be helpful if SHAFT supports uploading media and non-media files to browserstack

@mabouamer-93 mabouamer-93 added enhancement New feature or request triage needs to be looked at labels Sep 22, 2024
@MohabMohie
Copy link
Contributor

have you tried using this command dear?
You can use shaft to return the native driver, cast it to an appium driver, and use the push method.

https://www.browserstack.com/docs/app-automate/appium/advanced-features/upload-files#appiums-push-and-pull-file-command

example:

public void sampleMethod() throws IOException {
        SHAFT.GUI.WebDriver driver = new SHAFT.GUI.WebDriver();
        ((AndroidDriver) driver.getDriver()).pushFile("",new File(""));
        driver.quit();
    }

let me know if it works for you, we can wrap it with SHAFT when/if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage needs to be looked at
Projects
None yet
Development

No branches or pull requests

2 participants