Comments (11)
Did you use it on simulators?
https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-pasteboard/index.html#mobile-getpasteboard
Perhaps, you can get/set the value if WDA was foreground (I haven't checked it, but we expected this works on simulators mainly)
appium/appium#11610
from webdriveragent.
Got it. Then, please ask their support team. I guess they have their own rule.
await this.driver.activateApp( 'com.facebook.WebDriverAgentRunner');
syntax seems good, but the bundle id depends on their environment.
from webdriveragent.
I haven't tried it on the simulator.
You're right, when WDA
is foreground, I can get the content.
Thank you very much for your reply 🥳
from webdriveragent.
Did you use it on simulators?
https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-pasteboard/index.html#mobile-getpasteboardPerhaps, you can get/set the value if WDA was foreground (I haven't checked it, but we expected this works on simulators mainly)
appium/appium#11610
Is this still accurate? I have tried both Activate App and Background App, clipboard still returns nothing.
from webdriveragent.
I think so.
I quickly checked on my env, 14.2 x iPhone SE 2nd Gen x Xcode 12.1 combination. It worked when WDA was foreground.
Afaik, if you enabled clipboard sync between other devices (Handoff feature), it could affect when you copy something on other devices.
https://apple.stackexchange.com/questions/253109/how-can-i-disable-universal-clipboard-on-macos-and-ios
from webdriveragent.
I think so.
I quickly checked on my env, 14.2 x iPhone SE 2nd Gen x Xcode 12.1 combination. It worked when WDA was foreground.Afaik, if you enabled clipboard sync between other devices (Handoff feature), it could affect when you copy something on other devices.
https://apple.stackexchange.com/questions/253109/how-can-i-disable-universal-clipboard-on-macos-and-ios
Could you please share a code sample? I don't understand why something like this doesn't work:
async getClipboard() {
try {
const backgroundApp = this.driver.backgroundApp(10);
while (backgroundApp) {
const clipboard = await this.driver.getClipboard();
console.log(clipboard);
let buff = new Buffer(clipboard, 'base64');
return buff.toString('ascii');
}
} catch (error) {
assert.fail("Unable to get clipboard");
}
}
Switching to Settings doesn't work either. Clipboard will still be empty or undefined.
from webdriveragent.
You should bring WDA to your foreground. It looks like you brought your test app to the background, but you did not bring WDA to the foreground.
Instead of this.driver.backgroundApp(10);
, you should do like below addressed in http://appium.io/docs/en/commands/device/clipboard/get-clipboard/#description
@driver.activate_app 'com.example.WebDriverAgentRunner' # here should be your proper WDA bundle id
@driver.get_clipboard
from webdriveragent.
Oh, thanks! I'm using WebDriverIO, will investigate.
from webdriveragent.
Is this an Appium issue? None of these work, first line timeout, others just fail immediately:
await this.driver.activateApp(undefined, 'com.facebook.WebDriverAgentRunner');
await this.driver.activateApp(null, 'com.facebook.WebDriverAgentRunner');
await this.driver.activateApp( 'com.facebook.WebDriverAgentRunner');
Bundle ID appears correct based on start of Appium logs
[2020-11-16 13:59:49:293 - [debug] [WD Proxy] Got response with status 200: {
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "value" : {
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "message" : "WebDriverAgent is ready to accept commands",
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "state" : "success",
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "os" : {
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "name" : "iOS",
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "version" : "13.3",
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "sdkVersion" : "12.0"
2020-11-16 13:59:49:293 - [debug] [WD Proxy] },
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "ios" : {
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "simulatorVersion" : "13.3",
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "ip" : "192.168.11.159"
2020-11-16 13:59:49:293 - [debug] [WD Proxy] },
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "ready" : true,
2020-11-16 13:59:49:293 - [debug] [WD Proxy] "build" : {
2020-11-16 13:59:49:294 - [debug] [WD Proxy] "time" : "Oct 19 2020 15:53:00",
2020-11-16 13:59:49:294 - [debug] [WD Proxy] "productBundleIdentifier" : "com.facebook.WebDriverAgentRunner"
2020-11-16 13:59:49:294 - [debug] [WD Proxy] }
2020-11-16 13:59:49:294 - [debug] [WD Proxy] },](url)
from webdriveragent.
The productBundleIdentifier depends on how you set the bundle id. It refers to updatedWDABundleId
capability or the default bundle id (com.facebook.WebDriverAgentRunner). If you built/installed the WDA without updatedWDABundleId
capability, then it might be the default value. Or if you use Xcode 11 or newer, probably it has .xctrunner
suffix like com.facebook.WebDriverAgentRunner.xctrunner
. Xcode 11+ do like this change automatically in some cases outside of Appium.
If you manually have changed the bundle id, you should set it as you did.
from webdriveragent.
This is on BrowserStack, I don't have to interact with WebDriverAgent, its set up automatically. I tried updatedWDABundle capability earlier also, setting a custom name and had same result as above.
from webdriveragent.
Related Issues (20)
- build failure in new update 14.4 HOT 1
- window/size sometimes returns an incorrect size HOT 7
- Testing failed: No visible @interface for 'XCUIDevice' declares the selector 'pressButton:' Use of undeclared identifier 'XCUIDeviceButtonHome' Testing cancelled because the build failed. HOT 14
- 运行WebDriverAgent后出现的Automation Running hold both volume buttons to stop 提示蒙层能否去掉 HOT 2
- XCUIElementTypeAlert cannot be found HOT 1
- Expect outside of acceptAlertButtonSelector button will not automatically be click
- After installing the latest WebDriverAgent (WDA) on an iOS 17.4.1 system, the device can be tested using Xcode successfully. However, once the device is unplugged and I attempt to open WDA manually, it crashes. Has anyone experienced this problem? Assistance would be appreciated. HOT 4
- I want to keep the current screen brightness after starting wda. Is this possible? Currently, wda does not run after opening it, and the screen will automatically dim after a while. HOT 5
- IOS 17 real device, can't launch wda HOT 9
- The cloud real machine function flashes down
- Can I support devices with ios 9.0? HOT 1
- What is the minimum version of iOS system supported by MJPEG-Server HOT 3
- Build WDA Error ld: cannot link directly with 'XCTAutomationSupport' because product being built is not an allowed client of it clang: error: linker command failed with exit code 1 (use -v to see invocation)
- Using WDA without Xcode, WDA is crash. HOT 3
- App crashes when WDA interacts (e.g. clicks) with UI developed using Flutter v3.22
- Unable to Upload WebDriverAgentRunner (not the Integration App) to TestFlight HOT 2
- pointerUp doesn't work in iOS devices HOT 7
- webAgentRunner test running error? brower input http://192.168.199.143:8100 无法访问此网站 HOT 1
- [Feat] keep webdriverAgent active in Background, for clipboard ability HOT 1
- pause Action Not Working in Pointer Action Sequence HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdriveragent.