Blueprism: how to adjust attributes so same elements are highlighted on different screen size? - spy

I spied my elements using my laptop. Then I highlight the element I identified to make sure it is unique. This works fine when the browser window I am spying is on my laptop screen. When I move this browser window to a monitor screen, Application modeler is no longer able to identify the element I spied (it highlights a different region in the browser). I am using Browser-based applicatio -> browser launched from an executable. I was only able to identify my elements using the accessibility mode. Here are some screenshots of what happens when I highlight the element "English" from the application modeler:
What I see on my laptop screen vs what I see on the monitor.

I encountered the same issue when I used a built-in zoom function of internet explorer.
Below you can see a printscreen of a place where you can check the zoom function in internet explorer:
Please check if that fixed your issue.

It would be very nice to know how you spy this element and what Attributes are clicked on/off? But here is my solution to your problem without knowing much about your data.
Open up AplicationModeller where you spy this element and find your element in the list.
I guess your page is responsive so this element is not static. In attributes there should be a name called 'Path', this refers to the HTML path at which location you will find the element. There is also an attribute called 'X' and 'Y', this is the static location of where to find your box. I would click off both 'Path', 'X' and 'Y' then I would try to click on 'Title' and see if this is enough to do the trick, 'Title' = "English".

Related

How to set font in edit box part of a CMFCToolBarComboBoxButton?

I'm able to set the font used to draw the drop-down part of a CMFCToolBarComboBoxButton combo box which is embedded in a CMFCToolBar toolbar. However, I'm not able to set/change the font used for the edit field control which is part of the combo box. I.e., when the combo box is collapsed the currently selected item is always drawn with the standard/default font no matter what font is used for the entries when expanding the box.
I successfully change the font of the drop down box part by using a pointer to the underlying CComboBox object retrieved via CMFCToolBarComboBoxButton::GetComboBox() (and then via CComboBox::SetFont(...)). But when using the method CMFCToolBarComboBoxButton::GetEditCtrl() to obtain a pointer to the edit control part (in order to change its font, too) this method always returns a nulltpr. Does anybody know why or more importantly: What is the correct way to set the font used for the edit control part of the box?
I've searched the web now quite a lot but cannot find a solution to the problem. Thanks for any advice!
Additional note: I need to change the used font(s) at run time in my MFC application.
OK, I finally came to the conclusion that it's better to leave these fonts up to the OS settings anyway and not explicitly set them by the application code.
This is not a technically correct answer to the (my own) question, certainly, but may be a good advide for others chasing the same problem.

X inside search-box-input does not clear the text

I encountered a problem with the search boxes in my site while in IE. The search box is a sitecore component. Whenever I type in the search box and then click the X at the end, it goes back to the placeholder. However, when I click outside of the search box, the text that I previously x'ed out returns. I want the search box to be populated with the placeholder or at least remain clear. Also, there is no JS involved. I tried using JS to solve the issue but when I use developer tools, the x doesn't have a tag/name/ID, so I can't target it to manipulate it. If you require more information, please ask.

Selenium webdriver - Find coordinates of tab navigated video player element for interaction

I'd like to automate a video-player on a webpage using Selenium in Python.
I cannot locate the interactive parts of the player with driver.find_element_by_... I've decided to try and accomplish this by making browser specific logic that knows how to navigate the page and player via keyboard navigation (count tabs for Chrome, vs Safari, vs Firefox, etc.).
driver.find_element_by_tag_name('body').send_keys(Keys.TAB))
I am able to select each of the controls of the player with tab (play/pause, current position, mute-volume control, full-screen, and additional options) and have had moderate success manipulating the player's controls with ActionChains once selected with TAB navigation
actions = ActionChains(driver)
actions.send_keys(Keys.DOWN) # to reduce volume or
actions.send_keys(Keys.LEFT) # to rewind playback
An example of something that doesn't work as expected with this method is sending a Key.SPACE to the MUTE button when selected. Instead the space is applied as a page navigation action and scrolls down the page like pressing page down. I'm looking for a method that either makes the controls work as expected when manually navigating the page with a keyboard, ex. space on highlighted object interacts and would normally mute the video in this context, or a workaround that lets me accomplish the same thing. To that end I was thinking if I could get the windows coordinates of the TAB selected object within the video-player and simply perform a click that would at least let me interact with the control.
Also if I'm going about this all the wrong way let me know. Thanks!
What you're really looking for is how to navigate the Shadow DOM. Those are the web elements inside the video player.
I answered how to reach inside the Shadow DOM in an other question, albeit for Java. However the principle is the same.
You can read the whole thing at the link, but the basics are you create a "starting point" WebElement at the Shadow DOM via JavaScript, then all future look-ups reference it:
WebElement button = startingPoint.findElement(By.cssSelector("..."));

How do you display rapidly updating data to the user in a win32 GUI app?

So im building a basic win32 GUI app and I have a vector of data that gets constantly updated through an external source via a port. Im interested in displaying that list of data to the user but im not sure the best approach to go about it without causing update flickering.
I originally had an edit box in which I build a string with the information and update the window. But it has proved troublesome as the amount of data grows since I cant scroll down to look at additional data. Any ideas?
My idea is no point of updating the visual control as the same speed you receive the data. Because even-though you update at the same speed the users cannot see that change at the speed of data receiving. Human eye does not see a change happening in speed as 1/8th of a second. So better to update the visual control in a controlled manner. Maybe using a timer.
Appending to the text of an edit control for each subsequent data point will lead to flickering as the whole control re-renders as the text has changed.
I'd advise one of the following options:
1) use a ListBox or ListView control; when you add another row item, it only re-draws the new/changed/scrolled item. https://learn.microsoft.com/en-us/windows/desktop/controls/create-a-simple-list-box and https://learn.microsoft.com/en-us/windows/desktop/controls/list-view-controls-overview
2) If you only want an always-scrolling list of data, consider just having a command-line application that writes to the standard output and saves you a lot of trouble - cout or printf your data.
You can also use EM_SETSEL and EM_SCROLLCARET to automatically scroll, but also check the position of the scroll bar before doing that. If not at the bottom, it means that the user wanted to pause, so you can scroll.
Also, you can have the scroll lock key checked in order whether to scroll or not, after all that is what it's name is supposed to do.

how to hide windows 7 switch user button in vc++ CredentialProvider sample

I have provided a screenshot of my
CredentialProvider window. In this
window everything is fine now but i
don't want to show Switch User
button to the user. How i can do
this. I am just editing Win-7 SDK
sample for CredentialProvider
(C++). Anyone can help me, or any
link for code help.
One more thing I want to ask is by default, the username text box displaying EditText in grey color. How i could change it to Username text. I can set text in SHStrDupW(L"", &_rgFieldStrings[SFI_EDIT_TEXT]); code but its not setting in background text. is there any hack for this.
Thanks SO members
You cannot directly prevent the Switch User button from appearing; if the conditions are present that cause it to appear, then it's going to appear. What you can do however: prevent the conditions that cause it to appear.
That button appears either when a tile is in the selected state and 1.) your credential provider is enumerating tiles other than the one that is selected, or 2.) other credential providers are enumerating tiles.
The first condition is easy to prevent: In GetCredentialCount(), always report that you will enumerate only one credential. (This means of course that you must structure the tile to handle all users.)
To prevent the second condition, you will have to implement a credential provider filter. (Search for the "ICredentialProviderFilter" interface if you don't know what that is.)
Good luck.
To answer question 2:
The username text box is displaying EditText in grey color. You can change it to Username text. You set text using
SHStrDupW(L"", &_rgFieldStrings[SFI_EDIT_TEXT]);
Have a look at common.h, there you'll find
CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR s_rgCredProvFieldDescriptors[] = { SFI_EDIT_TEXT, CPFT_EDIT_TEXT, L"Edit Text" }
If you change this Edit Text to UserName then it will show in your Text Box.