HP-UFT how to tell if SAP Agentry / WPF image is clickable or disabled - hp-uft

Is it possible to get an object property for WPF image to find out if it is clickable or disabled.
I have tried these, but clickable and not-clickable images both return true.
...WpfImage("WO-Hold").Object.checkAccess
...WpfImage("WO-Hold").GetROProperty("canFocus")
...WpfImage("WO-Hold").object.IsEnabled
The WPF application im working from is SAP Agentry, these three buttons are to change the SAP work order status in this image: Play can be clicked. the pause and Green tick cannot be clicked.

You can use any of the following:
Identification property: enabled
...WpfImage("WO-Hold").GetROProperty("enabled") 'returns false If disabled; true if enabled
Screenshot:
OR
Native Property: Isenabled
......WpfImage("WO-Hold").Object.IsEnabled 'returns false if disabled; true if enabled
Screenshot:

Related

How to disable the click event in electron app

I am able to built the desktop app in electronJS. I am trying to implement the functionality to disable the click event on window when there is no internet connectivity similar to the slack.I found the API to detect the internet in electron but not able to find the way to disable the click events.
You can disable all pointer events by adding the following rule to your page's CSS:
body {
pointer-events:none;
}
or via JavaScript:
document.body.style.pointerEvents = "none";
to re-enable:
body {
pointer-events:auto;
}
or
document.body.style.pointerEvents = "auto";
You can do this on more specific elements to gain more granular control.
You could add an invisible panel in front of everything and catch the clicks there.

Is it possible to configure CKFinder as just a file browser without any upload functionality?

I want to be able to click on the image icon in CKEditor and be able to browser the local file system. I would like the chosen file to be passed to the editor just like the standard URL is. I want to use the base64image plugin to embed the image inline.
I have tried using CKFinder but, when I click the Browse Server button in the Image Properties dialog, I get an empty window with just 'run();' in the centre.
To enable CKFinder in read-only (gallery) mode, set the readOnly configuration option to true and pass it as a configruation option to the CKFinder.setupCKEditor function:
CKFinder.setupCKEditor( editor, {
readOnly: true
} );
This will disable the possibility to modify anything.
If you only want to disable uploads, you can disable modules related to upload operations:
CKFinder.setupCKEditor( editor, {
removeModules: 'FormUpload,Html5Upload,UploadFileButton'
} );
The second thing is to change Access Control settings in the server side connector by setting 'FILE_CREATE' to false so the uploads will be disabled also on the server side.

How do I get a list of hidden applications a user has access to?

In the Okta UI there's an option to hide applications from the dashboard, which is exactly what we want. There are some applications we want hidden in the Okta dashboard, but available in our custom applications.
But when we hide them from the dashboard, they also disappear from the list of a user's application links when pulling the user info from the API.
Any help on how to accomplish our task?
Seems like a bug. I would open up a ticket with Okta Support. A colleague of mine verified the same behavior.
As per http://developer.okta.com/docs/api/resources/users.html#get-assigned-app-links you should get a JSON object with hidden set to false.
This is indeed a bug. As of next week in PREVIEW, a GET call will return all apps regardless of whether they're hidden in the UI. Within the JSON body, two property attributes determine whether the apps are hidden in the web and/or in Okta mobile.
{
"visibility": {
"autoSubmitToolbar": false,
"hide": {
"iOS": false,
"web": false
},
"appLinks": {
"mc": true
}
}
}

Modernizr.geolocation is always true

I have a Modernizr check for geolocation support. I noticed it wasn't working as expected so I put in some logs to see what was happening. It seems that it is alerting true whether geolocation is enabled in the browser or not. I know I'm disabling geolocation in my browser correctly because it works as expected for Modernizr.geolocation demos I've found online.
//Check for geolocation support; hide "use my location" button if unsupported
if (Modernizr.geolocation) {
console.log('true');
//App.locateInit();
} else {
console.log('false');
//$('#geo-container').css('display','none');
}
I'm calling the custom Modernizr script with the geolocation piece. Any ideas as to what could be causing this? Please let me know what to look for or what other info you may need, I'm very new to Modernizr.
Thanks!
Which browser? Apparently your browser doesn't remove the API when its disabled, which means its impossible to detect the disabling. :(

"Don't Allow" and "Allow" buttons always off-screen on WP7 Facebook OAUTH browser control

I've developed a WP7 client that uses the Facebook C# SDK, using OAUTH and the web browser control.
Everything works fine except that on the page where the user is requested to accept/reject the access permissions I am asking for, the "Don't Allow" and "Allow" buttons are off the bottom of the browser's screen, and it isn't obvious that the user must scroll down to click on them.
I've tried using all the different display modes (touch, wap, page, popup) and "page" is the only one that shows the buttons on the same page, but then the fonts are tiny. I've also tried different sizes for the browser control.
The example in the SDK has the same behavior.
Has anyone found a work-around for this?
The solution I have found is to use Javascript to change the CSS properties for the element:
private void FacebookLoginBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
// check for when this approve page has been navigated to
if (FacebookLoginBrowser.Source.AbsolutePath == "/connect/uiserver.php")
{
showBrowser();
// do the script injection on the LoadCompleted event - doing it here will appear to work when you have a fast connection, but almost certainly fails over 3G because the elements aren't ready in time to be modified
FacebookLoginBrowser.LoadCompleted += new System.Windows.Navigation.LoadCompletedEventHandler(FacebookLoginBrowser_LoadCompleted);
}
// etc ...
}
void FacebookLoginBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
FacebookLoginBrowser.LoadCompleted -= FacebookLoginBrowser_LoadCompleted;
// Facebook will likely change this and break our code soon, so make sure you anticipates this
try
{
FacebookLoginBrowser.InvokeScript("eval", "document.getElementById('platform_dialog_bottom_bar').style.position = 'relative';document.getElementById('platform_dialog_bottom_bar').style.top = '-60px';");
}
catch
{
// TODO: display instruction to scroll down if we ever end up here
}
}
I hope that helps. Feel free to contact me if you run into problems
I haven't tried this, but could you use the WebBrowser control's Scale(SizeF) method to change the zoom level of the page?

Resources