Katalon recorder try multiple selectors - katalon-recorder

Inside one of the steps I have multiple tags like
<option>link=storage locker for ${uniqueName}</option>
<option>//a[contains(text(),'storage locker for ${uniqueName}')]</option>
I noticed that depending on the browser OS the second version works better. Is there a way to force Katalon to try each option?

Related

Using inspect.exe or UISpy.exe on java swing on Windows 10

Am I correct in assuming that tools like inspect.exe and UIspy.exe cannot handle java elements in a window? Consider this login box which has java elements (Login, Password, OK, Cancel). Login is not to be confused with the name of the window which is also login.
When I try to inspect the elements I can see only Login (window name), system menu bar and close (the X). I can't see any of the Java fields. Someone told me that he thought inspect.exe could not see Java fields and it could handle only the outer window. I haven't been able to verify. Is this true. If so what other tools are there to automate windows with Java fields? We will no longer be using Test Complete, so would need something else that runs on Windows 10.
If you use Swing, tools like inspect.exe cannot tell what's inside the window because Swing:
paints pictures of buttons, labels, text, checkboxes, etc., into [a] window...[so they are] meaningless pixels within a window from your OS's point of view.
If you use AWT, tools like inspect.exe will work because AWT:
uses the underlying OS or native GUI toolkit...[so] your OS knows about them
See https://stackoverflow.com/a/408830/

How to force a webpage to think that it is in or out focus?

I am trying to build a web app (to learn about WebSockets and adaptive behavior) that polls different social media sites and shows all the latest updates in one place. I want to make the page stop updating while out of focus, and then update again when in focus.
Testing the out of focus behavior has been very difficult, since I have to rely on logs to ensure that my app is working properly, and cannot have the window open in one monitor and work on the code in another monitor.
My question is:
Is there a way to "force" the tab to think that it is in or out of focus, like force element state in DevTools, but for the entire tab.
I am running Chrome on Windows 10. I could not find a way to do this using DevTools, and do not want to setup a whole testing framework just for such a simple thing.
Thank you for your time.
Open the Command Menu.
Run the Emulate a focused page command.
If you create a Live Expression and set the expression to document.hasFocus() you'll see that the page always thinks it's in focus after you run the Emulate a focused page command.

Is there any shortcut to select entire code block in Atom similar to Option + Up Arrow in PhpStorm

Is there any shortcut to select entire code block in Atom similar to Option + Up Arrow in PhpStorm?
It helps you select the code block and if you press Option + Up Arrow again, it expands the selection to its parent block.
Is there any shortcut or plugin to have that feature? It makes it faster to work with heavy code.
Yes! You want the expand-region plugin, it's great! Add these to your keymap.cson to expand the region with option-up (alt-up on windows) :
'atom-text-editor':
'alt-up': 'expand-region:expand'
'alt-down': 'expand-region:shrink'
Ctrl+Alt+M (Cmd+Ctrl+M on Mac) selects entire code inside the current brackets. It doesn't expand to the parent block though.
If you need that feature, you might want to look for some package. There is select-scope package that claims to add that functionality. I haven't tested if it works. It also doesn't seem to show up on the package list in every atom version.
If you decide to try that package out, you may need to override it's key-binding as it uses Ctrl+S.
This is now built into Atom.
https://blog.atom.io/2018/10/23/atom-1-32.html
Select Larger/Smaller Syntax Node

Unable to find IDs of a hybrid App

I have been using Selendroid; it works perfectly for native apps, but for some of the hybrid apps, it is not working properly. With the Employee Directory.apk, Selendroid Inspector works fine (able to get all the IDs), but for another hybrid app which I am trying, Inspector is not able to show the element IDs. Workaround: somehow I got the ID of a button (of a hybrid app) and am able to click on the button, but I want to get the ID from the Selendroid Inspector.
What could be the reason why the Inspector is unable to show these IDs?
If you are using chrome, type this into the address bar
chrome://inspect/#devices.
Just attach a device/emulator, open a browser and click on inspect on the inspect option.
This will let you access the id's, and different properties of the element you want.
You can build XPath addresses using those properties.
When it comes to hybrid apps. Some of the buttons might not have ids. It all depends if the developer added the ID. So you have to resort to cssSelectors, xpath or smth else. I asked the developer of the app i was testing to add id's to the button.

How can I display the same DOM across several tabs in a Chrome Extension?

I'm looking to build a chrome extension that allows the user to have an independent subwindow that is the same in each tab (for example you are taking notes and the notes are synchronized among each tab). Also, clicking a link should not destroy this subwindow.
One solution is to inject an iframe in each tab, and try to synchronize this data serverside and send back to each client tab, as it is updated.
This seems very tedious, plus the iframe would be provided by a third party, and I want to make it the easiest for them.
Is there a way I can have a shared dom piece and display it in its current state across several tabs?
There's an API (still experimental as of Chrome 17) that does more or less exactly what you want. If you visit about:flags, and enable "Panels" (they're enabled by default in Dev and on Canary (and on ChromeOS)), you'll be able to use chrome.windows.create with a type of panel to create a floating pane that exists independently from the browser window. That would likely meet your need.
Take a look at the Google Talk extension for an example of how it might work.