I want to UI Automation test for creating PDF File but below error shown. It can't find the storage path to can save file
androidx.test.espresso.PerformException: Error performing 'single click - At Coordinates: 358, 1078 and precision: 16, 16' on view 'with id is com.example.firsttest:id/CreatePDF'.
It works when run code as an app, but when run as an automation test not work.
It seems that Espresso is not able to find a View with id CreatePDF on the visible screen on which to execute the Click, hence the error stating that Error performing 'single click - At Coordinates: 358, 1078 and precision: 16, 16' on view 'with id is com.example.firsttest:id/CreatePDF'
If you are sure that the Test is being executed on the correct screen, check if you have disabled Animations on the device on which the test is being executed, otherwise Espresso might execute the Test while the animations are still running and it is unable to find the mentioned View. You can check how to disable the animations on the device in the Espresso documentation
If that is not the case, then it could be the case that the Test is being executed over a previous Activity, Fragment or View where the CreatePDF View is not yet visible.
Related
I am trying to run a very simple apple script from VBA. The VBA code is:
NavigationJunk = AppleScriptTask("Budget Report Apple Scripts/NavigationMoveWindowsAppleScript.scpt", "NavigationMoveWindowLeftHandler", "")
The script reads:
on NavigationMoveWindowLeftHandler(Junk)
tell application "System Events" to key code 123 using {option down, control down}
end NavigationMoveWindowLeftHandler
where the complete path for the .scpt is: "/Users/Andrew/Library/Application Scripts/com.microsoft.Excel/Budget Report Apple Scripts/NavigationMoveWindowsAppleScript.scpt" (this is the correct path as documented here: Apple Script Task Throwing an Error 5
This code simply performs the key stroke cntrl+option+left arrow. That key stroke is a shortcut for the app Magnet to move the window to be half screen left.
This worked prior to updating my system to MacOS Ventura. I attempted to restart, uninstall Excel, reset the permissions in System Settings/Privacy/Automation (as documented here: Reset MacOS Privacy Settings) and reinstall Excel. When I tried to run the VBA code I was prompted to grant permission to system events and still received an invalid procedure error. I verified that when I call the handler from within the Apple Script Editor the system performs the keystrokes with no issues. I assume this is some sort of permission thing...How do I fix this?
Of note: this code called prior to the AppleScriptTask above runs just fine:
AppleScriptResult = Split(AppleScriptTask("Budget Report Apple Scripts/NavigationMoveWindowsAppleScript.scpt", "NavigationGetScreenResolution", ""), " ")
This is curious because the .scpt is the same file and calls a different handler:
on NavigationGetScreenResolution(Junk)
return do shell script "system_profiler SPDisplaysDataType | grep Resolution"
end NavigationGetScreenResolution
and runs just fine. Any help here would be greatly appreciated
I pull requested a fixing typos in some .md files in a Microsoft repository https://github.com/microsoft/MixedReality-UXTools-Unreal/pull/28/commits/a371f7627fd562f4f73e5f87c32fc8b179d98e8f all modifications where done using my Visual Studio Community 2019
After my commit I receive a message "Some checks were not successful" the first one is https://github.com/microsoft/MixedReality-UXTools-Unreal/runs/2009069256
Build #20210302.1 failed
1 errors / 0 warnings
ANNOTATIONS
Check failure on line 21 in Build log
azure-pipelines / Docs
Build log #L21
PowerShell exited with code '1'.
If I click to Check failure on line 21 in Build log it send me to the three files that I changed, but no one show any thing linked to Azure-Pipelines
Lines 21 of each code are:
1st File (Docs/BoundsControl.md)
`UxtBoundsControlConfig` data assets are used to configure:
2nd File (Docs/PressableButton.md) 21st line is the following
Add a [`StaticMeshComponent`](https://docs.unrealengine.com/en-US/Engine/Components/StaticMesh/index.html) (or any [`SceneComponent`](https://docs.unrealengine.com/en-US/API/Runtime/Engine/Components/USceneComponent/index.html)) to the actor and set the visuals property of the `UxtPressableButtonComponent` to reference this new mesh. Also ensure that the local positive x-axis of this mesh component points in the direction the button is expected to be pushed. Any component children of this mesh will move along with it as the button is pushed.
3rd File (Docs/ReleaseNotes.md) 21st line is empty
It seems you have triggered a pipeline run from within a GitHub action. Check this documentation: https://github.com/marketplace/actions/azure-pipelines-action. Since the pipeline failed, you need to check the pipeline in Azure DevOps to see the detailed log.
I am trying to run some unit tests for code that makes use of wxWidgets windows. In the process, windows are created, but never displayed. This works fine under Linux where a display is available, but not on build systems that don't have X or any other UI/display.
The error I get is: "Unable to initialize GTK+, is DISPLAY set properly?"
Is it possible to unit test wxWidgets without a display? I'm hoping there is some way to just have a stub or "null" display that doesn't really exist, but would allow the unit tests to execute.
As mentioned, I don't need to actually display any window, but from the working tests on a system with a UI, I do need to initialize the app, and create a top level window, like so:
wxEntryStart(argc, argv);
wxTheApp->OnInit();
wxFrame frame(nullptr, wxID_ANY, "Test Frame");
wxTheApp->SetTopWindow(&frame);
You can set up an Xvfb server (or perhaps an Xvnc server), and use it as your dummy display.
I am using WebdriverIO for automation and am required to resize an open window to check the display of various UI elements compared to a maximized display.
I've tried each of the following separately with no success:
browser.setViewportSize({width:1200,height:662})
browser.windowHandleSize(1200, 662);
I also have checks to make sure the window has been properly resized:
expect(browser.getViewportSize('width')).to.be.lessThan(1300);
expect(browser.getViewportSize('width')).to.be.greaterThan(1000);
Unfortunately, nothing happens visually and the expects fail, as expected. I'm not sure if I'm not understanding how to use setViewportSize or windowHandleSize properly (maybe they're only intended to be used to resize new windows rather than existing ones?), or if this functionality exists in WebdriverIO at all.
I've used the following command in my WebdriverIO Config in setup hooks, but also just tested it in the middle of a test that's already running to both resize it smaller and then back to larger. Hope it helps!
browser.windowHandleSize({width:700, height:500});
browser.windowHandleSize({width:1280, height:870});
http://webdriver.io/api/protocol/windowHandleSize.html
Just to note as there have been several updates, please make sure your browser drivers, WebdriverIO, and Selenium Server are the latest versions!
In case someone else comes here and is confused, the API call is setWindowSize, with the arguments (width, height):
browser.setWindowSize( 700, 500 );
See: https://webdriver.io/docs/api/browser/setWindowSize.html
Note that the above command resizes the window but not the content. The setWindowRect command from the default WebDriver interface sets an absolute content size:
browser.setWindowRect( 0, 0, 700, 500 );
See: https://webdriver.io/docs/api/webdriver.html#setwindowrect
I have a form and a button on it.
I want to open a processing file which is inside a folder.
I wrote the following code which is throwing an exception.
inside the button click event the following code I wrote.
System::Diagnostics::Process::Start("path2file.pdf");
Correct it as below:
System::Diagnostics::Process::Start("G:\\IISC\\dyanamic models\\eco indicator 99.pdf");
or
System::Diagnostics::Process::Start(#"G:\IISC\dyanamic models\eco indicator 99.pdf");
In Java , It's damn easy :
Runtime.getRuntime().exec("cmd /c start "G:\\IISC\\dyanamic models\\eco indicator 99.pdf");