How to select an Element that has hashed class name dynamically generated? - playwright

I need to have all the messages from the past one month in a mobile app. So how can I select the messages from each group conversation? I have tried xpath but that turned out be very confusing to work with.
I have used playwright for that. Need to know how can I execute scrollToTop and scrape all the loaded converstions

Related

Multiple Export of Different Selections in Dropdown selection

I'm trying to find a way to automatically change the dropdown to the next name on the list, wait for a second or so for the results below to change and then export that page as PDF!
I would do it manually but there will be about 100 names on the list!
The data pulls up fine it's just the avoiding all the manual work that would be done each month for the 100 people!
And maybe if there's a way to rename the pdf with the name of the person?
Too Much?
I
Why not make a script ?
You could first get all the item of your drop down list, then you change the cell value of your drop down list and you pause the script for 1 second.
If you need more help to do it just ask me !
this is not really resolvable in the scope of Google Sheets only. basically what you need is a macro that will run outside of the box and automate whole this process while you take a quick nap. you should look into AutoHotKey which is able to do exactly what you want with delays, auto clicking on buttons to download and stuff like that. there is full documentation on how to build your script, many tutorials and even discord channel if you need pro help. Example:
https://youtu.be/bS-ycdoOyj8

Is it possible to have options on select change from when other select changes without javascript

There are a bunch of question on this but no answers on how to do it without javascript.
If you have one form that has 2 select boxes. The second select box has different options based on what you choose for the first select box. Here is a js example. Not all users have js enabled so for these users this option would be unavailable.
Can this be achieved solely using CSS3, HTML5 and Ruby? I would show what I've got so far in trying this but I got nothing.
What you are asking is how to manipulate the DOM after it has loaded without a client-side scripting language. This is not possible as far as I am aware; unfortunately that is not what you want to hear.
The proper solution in this case would be to have the user submit the page and generate the second selection box at that time. You will have to rely entirely on server-side logic to handle the problem. So basically something like:
Serve a page with just a single selection box
When the page is posted generate a similar page where the first selection is locked and display a second selection box with the possible options.
Continue the iteration until you have all of the required selections filled out by the user.
Serve the result that the user requested.

How to see log in attendances in calendar

I am creating a project in RoR. I have a log in feature and i want, for example, a user log in and the date when he did it can be seen on a calendar. Also i want a user to see all his log in attendances on a calendar. Could any one give me an idea how to do it?
Thank you!
You could use the public activity gem to record user activity.
Here's a RailsCast for it.
The hard part would prob be how to get it to record
everytime you log in, it would depend on what login approach you use, it usually should have some method that gets called that you could slip in activity logging logic in.
Putting it on a calendar is a whole different story though, would recommend looking for some jquery calendar plugins that accepts json, and have rails spit out the user activity in json format.
You'll probably have to customize the jquery plugin to fit your needs.

Importing custom data into Jira issue

I am looking for a simple way to get data displayed in an issue as just plain text. Basically, I want to be able to type in a lookup id in the issue creation and then once the issue is created, it would call one of our web services to retrieve data connected with that ID.
This wouldn't be coming from another issue tracker, but rather straight from one of my databases.
What would be the easiest way of accomplishing this? I would like the workflow to be: Enter id #, hit save, see the data with that ID displayed in the ticket (Doesn't need to be editable, just displayed in the ticket view).
The easiest way is to create a workflow function that is triggered at Create transition to do the job. There your code can query information from the database and replicate them into JIRA standard and custom fields of the issue itself.
Then you can prevent edition of replicated fields by tuning Edit screen for your issues.
You can also use your function to update field content from time to time, either at transition or in a trigger.
An option is to create some read-only custom fields than query each piece information from the database. It will prevent data replication but it will be probably slow and it does not apply to default fields.

Invoice model recommendation

I just started to develop an invoice app. I would like to hear your opinions and recommendations about this dilemma.
The invoice has a client section. The client can be selected from a drop-down select menu or it can be entered directly into a text field. Let's say it's just a one time purchase and the client won't ever come back. Should I have these two columns: client_id and client_field so either of those two can be filled out? The negative side is that a lot of client_field will be empty. Or should I not use a client_field and just add a new client even thought that client will only be used once?
Be consistent and use a separate client model and client_id even for clients that only appear once. If you have both client_id and client_model you will have extra complexity:
Your validation will have to check both and ensure that everything is consistent.
You will have to o.client.try(:name) || o.client_field and such all over the place just to display data.
If you change the structure of your client records in the future you will have to reformat your "table within a table" client_field kludge.
Any database based reporting will go from simple SQL to a monstrosity of LEFT JOINs and CASE statements.
And those are just a couple things off the top of my head.
If you're worried about having a dropdown with a lot of entries — and you should be worried about any dropdown with more than ~20 entries — then go with just an autocompleting text input or limit the dropdown to the top ~20 clients and use a autocompleting text input for the rest (or perhaps even a JavaScript based combo-box); there's a good chance that the dropdown won't even get used by your users, accountants and other people that do a lot of data entry and invoicing often hate having to reach for the mouse.
Is there anything wrong with having an auto-complete field where, if submitted without a matching ID, you will just create the client and link them in?
That's what's expected from the stand-point of the user and it's how applications like QuickBooks have worked for years.

Resources