Interacting with QlikView using PhantomJS - javascript

I am trying to simulate traffic on QlikView dashboards for the purposes of load testing. I have created a number of simple dashboards that I am viewing in a web browser. When I click anywhere on a graph or select a field in a list box, I can see that network traffic is generated as the application filters to display updated results.
I would like to simulate this traffic by opening the dashboards with PhantomJS and pretending to click on a few different places. Ideally, I would like to select an object such as chart or listbox and click on that programmatically but clicking on random coordinates within the page should suffice as well. However, the usual JS/JQuery click() operations do not appear to have any effect within QlikView even when displayed in a browser.
Any input as to how to approach this would be much appreciated.
Thanks.
Some additional info per comment: Yes, unfortunately I've tried everything on that page and just about everything else produced by stackoverflow/google searches. I can grab elements and do all the normal operations but the pages produced by qlikview are structured differently from any I've worked with. The majority of the elements are clickable and you actually interact with dashboards by dragging the mouse over sections of graphs to zoom in, or selecting criteria from listboxes. Somehow they fire Ajax calls from deep in qlikview's js but on the surface all elements appear as mostly divs and spans without explicit onclick functionality which may be why they don't respond to anything I've tried so far. For this reason I think moving further away from working with individual elements and simulating something like selecting a random portion of the screen may be best but no luck so far.

Related

Bluebeam Scripting - Custom Columns, Markups, & Forms

BLUEBEAM AND ADOBE ARE BOTH PDF VIEWERS THAT HAVE A LOT OF SIMILARITIES
Hello, I am trying to figure out how to link a form answer to some markups (tools).
Custom Columns that are created In Bluebeam:
When I create a new tool I can manually fill out all of these custom columns under the "Custom" section within the settings of a tool:
Then I can save that tool and all of the data will be repeated for every copy of that tool. However, the circled columns in the first picture would be changing on every page. Which means I would have to make a new tool for every page. (FYI I would be making ~20 tools for this, so I would have to update 20 tools every single page ;_;) Therefore, I want to create a dropdown/textbox on each page with those columns. When a user fills out the dropdown/textbox, the markups are automatically updated with that info, which means the custom columns are also updated.
Does anyone have an idea of how to link these?
As of now I have been able to create a code that creates a popup if a user selects a certain drop down. This shows me that you can grab the data from a user. I just don't know how to connect that data to all the markups (tools). I know each markup has a special ID, but I'm curious if you can somehow link to the tools "subject" property to do this.
Bluebeam provided me with their JavaScript API if that is any help.
https://i.stack.imgur.com/yEdU1.jpg (I got this image from this post JavaScript Library with Bluebeam)
UPDATE
I found another document with potential accepted scripts for Bluebeam. Please note this one will require people to have Bluebeam Revu eXtreme
https://support.bluebeam.com/wp-content/uploads/2019/08/Bluebeam-Script-Reference-2018.pdf
This version actually has a markup section (which are the things I am more or less wanting to have the custom columns be updated for with the user input)
This document seems to be relevant only for the Bluebeam Script Editor. You can open it by looking in the folder for Bluebeam from your start window.
There are 2 issues I have with this though. I haven't figured out how to run the codes I have in the script inside of Bluebeam yet and I am curious if there is a way to not need the markupID's and/or a way to get them without having to download the markups
I've been lurking on stack for so long, I finally have something to contribute...
I work with custom columns and toolsets all the time. I think you're missing a basic understanding of what the markup list is. Or maybe I am. The markup list is the table of data at the bottom of Bluebeam, where you're trying to change column headings.
The markup list is basically a table of data, what you're trying to do will change the column headers per page, which would change it for all entries. From what I know about Bluebeam, these are static, just like any database or table in any application like Excel. If you need to have different column headings, you need to just stack them all and use what you need on each page or from tool to tool. Or create different profiles with different custom columns, but this gets messy having multiple profiles accessing a single document. Maybe java can help show and hide these per what's relevant on the page within the custom field. But... I think the java is limited to be used within PDF form fields and some basic PDF actions such as print, save, etc. I don't think the level of coding you're looking for exists within Bluebeam.
I use profiles to manage custom columns per process, not the actual tool. It's kind of unclear exactly why the custom columns can follow the tools without the actual profile though.
What I do to accomplish complex tasks is export the markup list and build something within Excel VBA to tabulate data and export reports with relevant information. I'm sure you could use basically any coding language to accomplish this after the table is exported from Bluebeam.

Adding text to clipboard (or pasting to cursor) in Chrome extension V3

I'm building extension for Chrome using manifest V3. Interaction I'm trying to achieve is:
User clicks a button in context menu.
Extension communicates with the server and receives some string in response.
User clicks another button in context menu and said string gets pasted where their cursor is.
I see two ways I could achieve it and I'm not sure which one makes more sense (or how to get either to work, really):
One would be to have said string put into clipboard and then have user access it with paste command.
Second would be to have a separate context menu button which upon pressing pastes the string where the cursor is.
Either solution would work for me, however I prefer one that asks for less permissions from user (I'm already accessing storage, requests and context menus). So far I was also able to avoid using background workers and event pages, which provided some convenience when working with context menus - I'd like to keep it that way, but I'd rather have my extensions actually working ^^
Unfortunately Chrome documentation is rather confusing, bordering on circular, when explaining how to achieve something like this, especially within Manifest V3. How do I go about it?

Social media ‘#‘ dynamic dropdown and links

I’m curious to know if the ‘#‘ linking that you see in several social media sites to reference another user (dropdown pops open, user is selected, text becomes a link) has a well defined pattern or solution that exists in the wild. I haven’t attempted to solve the problem myself because there is no need to reinvent the wheel if this sort of thing is laid out somewhere, and this problem is indeed several smaller problems in itself.
Everything I could think to search for hasn’t yielded any remotely close results.
Note: I would be implementing this is Typescript/javascript

Modal dialog with dropdown list is not fading out right away after dismissal

I've got an angular app and I integrated it with UI Bootstrap project. I'm using regular
The modal dialog with dropdown containing 750 records, when one of the items is selected and clicked "Ok" or "Cancel", the modal and the overlay fades out without any delay.
Here's the plunker:Modal dialog with 750 records
If the modal dialog with dropdown containing around 10k+ records, and one of the items is selected from the list. Clicking "Ok" or "Cancel" is not hiding the modal dialog right away, instead I'm having a 8-10 second delay on Chrome, I've not tested on IE yet.
Here's the plunker:Modal dialog with 10k+ records
Question: Why I'm having performance hit with more data?
You are slowing the whole entire browser down by grabbing the DOM by the neck and pouring 10,000 <option> nodes down its throat. You need to lazy load your data somehow. Ever noticed on sites like Twitter, Facebook, and others that when you scroll to the bottom of the page it will begin loading more records from the server? Good apps will start to garbage collect old records that have been scrolled up as well.
When you scroll through your Facebook news feed it's not loading all your friends post since 2007 into the browser all at the same time. Once a maximum number of posts exists in the DOM Facebook will start removing the oldest ones you scrolled up to make room for more and grab fresh posts from the server so you can continue scrolling. You can even see your browser scroll bar jump up as you scroll down because more posts are being added to the DOM.
No browser is going to be able to handle that much data. The browser is not a database. I'm amazed your plunker with 10k records is as performant as it is! Haha. A dropdown is not what you want to display that data. You're going to have to sit down and think of a better way to show that data to the user. My first thought is to provide a filterable list that initially contains the top 25 most selected options or something, then typing in a search field causes it to load a new list from the server that matches the search criteria. Only you will know what your users will actually want, but I assure you it's not a dropdown list with 10k+ options.
Example:
Notice how the browser scroll bar jumps up a bit when it gets to the bottom. Twitter gets to the bottom and then loads more data to scroll through. It will eventually start cleaning up data at the top of the page as well if I scroll far enough.
Modern browsers can handle a lot, but 10,000+ <option> nodes is pushing it overboard.
The browser can handle a large number of values in a dropdown list, but a dropdown list isn't meant for such a task. Not to mention the users will have a hard time selecting an appropriate value, even if you sort them alphabetically.
You would be much better off using an input text box instead of a dropdown.
jQueryUI has some nice autocomplete features that would improve not only the performance of your web application, but also make the user experience much more bearable. I would any day prefer to type out one of the 10,000 options provided to me than search for them in a dropdown using a mouse and select them.
Here's an example on jsfiddle with ~8.5k records for a performance test.
Let me quickly tell you few points:
It is a usability bug to scroll through 10K records. Consider someone going through 10K options and selecting the one which they want. Not a good idea.
Performance issue:
If the options were rendered from a back-end in a traditional way (non-Angular way) then it would just take time to load but after that the performance won't be such an issue.
Since, you are using AngularJS with ng-options, the options are populated in the front-end and you have all the data in Angular's scope. To perform, two-way binding, Angular always does a dirty-checking in each 'digest cycle' which loops through each and every data element in $scope and causes that delay.
Solution:
Use Select2's "Loading Remote Data". Select2 is a jQuery based replacement for select boxes.
Consider using the AngularUI's Select2 wrapper instead of directly using it.

How do I limit the number of options displayed in an HTML Select element dropdown menu?

Essentially the length of the HTML Select drop down is exceeding the screen on notebooks, I've checked and different browsers allow different amounts of options to be displayed before it turns it into a scrollbox. Is there any way of putting in a browser css hack or javascript action to stop it at 3 options? Failing that is there any way to limit the height of the drop down for the same effect?
I've googled up on this but with no such luck, no one seems to have had a problem with notebooks before. I know it's possible as on the Lloyds TSB personal login screen there is a select element which limits to about 3/4 options. As I say I don't mind using JS or even browser specific solutions as I've developed a notebook friendly way of doing it which is less intuitive and clunky looking but can be used as a default.
Any help would be greatly appreciated.
Rupert S.
Sadly, you can't change the item's that the dropdownlist displays, it is decided by the browser, with the size option it will loose its 'dropdownlist' form, and turn more into a list.
You could try finding some Jquery dropdown list, they are usually editable to whatever you want.

Categories