R
R
r3xcl2021-03-25 03:04:22
JavaScript
r3xcl, 2021-03-25 03:04:22

Automation in webview?

Purpose - when starting the webview from the application, it is necessary that a number of actions are automatically performed on the site (with the search for renting apartments) 1) Open the filter 2) select the number of rooms in the filter 3) enter the desired price 4) click search
*The desired price depends on the entered price in the application, also the choice of the number of rooms depends on the number entered in the application.
Is it possible to achieve this functionality using JavaScript or in some other way?
Please tell me, direct me to the right thoughts)
I am not familiar with JavaScript at all, but I know that the code written in this language can be executed in webview and that actions are automated using it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2021-03-25
@r3xcl

I know that code written in this language can be executed in a webview and that actions are automated using it

In fact, you yourself have answered your question. Yes, with JavaScript you can interact with the page.
In short, you need to wait for the page to fully load, then click on the button to open the filter (find this button by its id or xpath), select the appropriate filter and filter value. Then find the input where you want to enter the price and add the cost there. Well, then find the search button and click on it.
You can use classes, ids, and xpath to find DOM elements. You need to learn the basics of JS. For example - https://www.w3schools.com/js/default.asp
On the other hand, I would recommend looking for the API of a particular service (such as booking.com hotelbeds.com, etc.) or if the project of finding accommodation is your project, then you should think about releasing REST. So you can access another application without JS and get the data you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question