js button

10/15/2018 13:08 Shuwe#1
Hey guys, I'm coding bot for local marketplace [Only registered and activated users can see links. Click Here To Register...]

I made code to login and to click on this button
[Only registered and activated users can see links. Click Here To Register...]

Next I want to do is to click on this button [Only registered and activated users can see links. Click Here To Register...] but that button doesn't have ID, so how can I do that?

Thanks in advice!
10/15/2018 17:30 florian0#2
Instead of relying on button clicks, you can send requests directly. Capture the request in the developer tools of your browser and implement it in your application
[Only registered and activated users can see links. Click Here To Register...]

Aside from that, you can use XPath to create complex matching patterns for finding your buttons. Match other things instead of just the ID-Tag. CSS-Classes, different additonal attributes, location in the DOM, etc.
10/16/2018 12:04 Shuwe#3
Quote:
Originally Posted by florian0 View Post
Instead of relying on button clicks, you can send requests directly. Capture the request in the developer tools of your browser and implement it in your application
[Only registered and activated users can see links. Click Here To Register...]

Aside from that, you can use XPath to create complex matching patterns for finding your buttons. Match other things instead of just the ID-Tag. CSS-Classes, different additonal attributes, location in the DOM, etc.
Button do this on click

Code:
onclick=
"$('#vrstaobjave').hide();
$('#staprodajete').show();
sredi_div('prodaja');
$('#kategorija_sug').focus();
$('#zasto').hide();"
so how do i find this button by c#
10/16/2018 13:23 chronicles666#4
It doesn't matter what the button does when clicked. You only need to mimic the communication between a browser and the website server. Try to find out what network request is made (if any) after you click that button. I signed up on that page, but it asks me to verify my phone number before I'm allowed to submit an offer (because I think that's what you want to automate), so I can't really inspect the request for you.
10/18/2018 22:37 Serraniel#5
#moved