Drop down menu in classifieds ads websites

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28
Soo .. first of all thank you for stopping by ... now .. i have this problem, that i'm trying to figure it out, I managed to find a fix but it's nowhere near perfect. Basically i want to take a vehicle from the website and post it back on it.
I'm trying to replicate ads on this website and they have this drop down menu, on year, make and model

The year part i managed to get it working with

Код:
return "2018|1,2017|2,2016|3,2015|4,2014|5,2013|6,2012|7,2011|8,2010|9,2009|10,2008|11,2007|12".Split(',').First(s=>s.Contains(project.Variables["year"].Value)).Split('|')[1];
it's working because there aren't so many options, but on the make and model part there are more then a few hundreds options. So i'm trying to make it select automatically.

This is how an ad looks like.

ad.png


I need the above details to be parsed, wich i parse them and transform them to automatically fill the fields below

psot.png


Is there any other way to select them based on the text and not on the value ( 1,2,3,4,5, etc) because the Marque (Make) ther are 60-80 selections then the Modele is waaay bigger. I know it can be done, but i dont know how.
any help would be greatly appriciated.
 

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
with out giving us the site there is little we could POSSIBLY do because we cant load the page to see the code or interact with it. please be aware of this
 
  • Спасибо
Реакции: awzse00

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Soo .. first of all thank you for stopping by ... now .. i have this problem, that i'm trying to figure it out, I managed to find a fix but it's nowhere near perfect. Basically i want to take a vehicle from the website and post it back on it.
I'm trying to replicate ads on this website and they have this drop down menu, on year, make and model

The year part i managed to get it working with


it's working because there aren't so many options, but on the make and model part there are more then a few hundreds options. So i'm trying to make it select automatically.

This is how an ad looks like.

I need the above details to be parsed, wich i parse them and transform them to automatically fill the fields below

Is there any other way to select them based on the text and not on the value ( 1,2,3,4,5, etc) because the Marque (Make) ther are 60-80 selections then the Modele is waaay bigger. I know it can be done, but i dont know how.
any help would be greatly appriciated.
Have you tryed click in that combox and use a keyboard simulation typing text?
 
  • Спасибо
Реакции: awzse00

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28
It's a drop down menu, if first selection is let's say Audi then the value will be 1. So i don't think keyboard simulation will work, if anybody know how to make it work with keyboard simulation let us know, but i didnt managed to get it working with that.
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Just add a keystroke emulation and in action box, type exactly what you want to select, as example, if fist option say Audy and you want to select Ferrari, just type ferrari in actions, remember to send focus to related dropdown before start keystroke emulation.
 
  • Спасибо
Реакции: awzse00

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28
I tried your recommendation but they doesn't support typing in the drop down, some websites do some don't, this one doesn't :(
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Well, for me a simple set value works on that site, I hope it help you.
 

Вложения

  • Спасибо
Реакции: awzse00

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
working or you still need help?
 
  • Спасибо
Реакции: awzse00

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28
Well, for me a simple set value works on that site, I hope it help you.
Thank you for taking the time to making the sample, i know how to record it, my question was I have variable.make "Audi" and variable.model "A5", that i extract from the existing ad, now how to i make it fill the make and model on the posting page with the Make and model.
 

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28
working or you still need help?
I still didnt figure any way out on how to make it work, other then the c# version. The make is only about 80 selections available, but on the model there are another aprox 50 selections per make, so 80 times 50 that's about 4000 options, and writing that into c# i think it's silly, i know that must be another way that works better. Thank you again to everybody
 

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
k give me a few
 
  • Спасибо
Реакции: awzse00

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
Here u go i think this is what you needed i didnt FULLY auto it as i cant bloody read WTF is going on on this page but i think this will get you over the hump
 

Вложения

  • Спасибо
Реакции: awzse00

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28
Here's the problem i have, i have uploaded the template so you can see exactly my problem, i don't know how to select Peugeot 308 from the make and model list, i mean "select" to automatically fill my variable value wich in this case is Peugeot 308 on the next one can be audi a4, next seat ibiza, etc. Please run the template so you can see. Again thank you for your time and effort.
 

Вложения

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
OMG...
ok...
well if you LOOK at what i uploaded no conversions are realy needed so you may want to redo this as its a bit easier to work w but ill see what i can do about selecting the modle
 
  • Спасибо
Реакции: awzse00

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
Here you go there is how you you selcet the actual modle and make (selected item)
upload_2018-12-13_9-46-36.png
 

Вложения

  • Спасибо
Реакции: awzse00

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
At all, you will need at least a basic concept about computer programing, a basic knowledgement about html and a good logic to do the job.
"May the force be with you".
 

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28

awzse00

Client
Регистрация
16.03.2013
Сообщения
231
Благодарностей
36
Баллы
28

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
The method is good, but it's not working, I can't select the Marque, only the model.I think that the java script doesn't load the selection that i make, it only edits the text part, but not seeing it as a selection, i hope i explained this ok it starts to really get on my nerves :dy:
ok, so i see here it is working Dont know what the issue was w the selection zeno showing the number and nto the designated selected item... IDK but just wen though and selected till the selected item was what you were looking for based on the prior scrape
 

Вложения

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)