Home > other >  Python selenium positioning elements after clicking no response what reason be?
Python selenium positioning elements after clicking no response what reason be?

Time:10-09

Python selenium on a web page for the element, call the click () function, not present and the same effect as manually click


This is before and after the click figure

This is the source code, it should be use the ztree jquery plugin, the front end is not very understanding, who is a great god know how this kind of situation should be simulated browser operation can click on the button,
Thank you very much

CodePudding user response:

Positioning on the high seas customers click no reaction?


This menu, as well as practical operation, first locate [customer management], click later, wait a few seconds, relocation/high seas customers click again.

CodePudding user response:

reference 1/f, old coconut response:
positioning on the high seas customers click no reaction?


This menu, as well as practical operation, first locate [customer management], click later, wait a few seconds, relocation [customer] open the click again.

Is not, after I get the customer to manage this element, call the click no reaction, the high seas customers which is in the browser manually I order, I want to achieve is to simulate manually click customer management and expand the operation on the high seas customers

CodePudding user response:

That is about to make sure your element localization is accurate, use byxpath?

CodePudding user response:

The
reference old coconut reply: 3/f
element that is about to make sure your positioning is accurate, use byxpath?

Have id, I directly by_id positioning

CodePudding user response:

Don't see ID from the HTML source code,
After the positioning, can try to print the text element, to ensure accurate positioning,
The selenium element accurately, click failure are generally two kinds of reasons, 1, not visible, 2, mask,

CodePudding user response:

reference 5 floor old coconut reply:
don't see ID from the HTML source code,
After the positioning, can try to print the text element, to ensure accurate positioning,
The selenium element accurately, click failure are generally two kinds of reasons, 1, not visible, 2, mask,

I changed a way to locate
One_button=the find_element_by_xpath ("//div [text ()='customer management] ")
One_button. Click ()
With this is that ok? But still no response, I so output text is four word with customer management,

By the way, it is related to the binding click event? Is it possible I clicked on this element, but there is no binding click event on this element?

CodePudding user response:

There's a possibility, would you like to check the "customer management" of the upper elements, look is an element that has the corresponding click event,

CodePudding user response:

refer to 7th floor old coconut response:
there's a possibility, you have to look it up in the 'customer management of the upper elements, the look is an element that has the corresponding click event,

Mainly used a jquery ztree here, I don't know how to deal with this

CodePudding user response:

Don't have to study the jquery, as long as understand clicked, is that a few elements triggered the click, js is show the code of the next straton menu

The function main menu [] to [statistics] HTML code post to have a look, see if I can find a breakthrough,

CodePudding user response:

references 9 f old coconut response:
jquery don't have to study, as long as understand clicked, triggered the click, js is that a few elements is show the code of the next straton menu

The function main menu [] to [statistics] HTML code post to have a look, see if I can find a breakthrough,

Ok, let me comb, I ask you again

CodePudding user response:

references 9 f old coconut response:
jquery don't have to study, as long as understand clicked, triggered the click, js is that a few elements is show the code of the next straton menu

The function main menu [] to [statistics] HTML code post to have a look, see if I can find a breakthrough,

Hello this is web page source

CodePudding user response:

references 9 f old coconut response:
jquery don't have to study, as long as understand clicked, triggered the click, js is that a few elements is show the code of the next straton menu

The function main menu [] to [statistics] HTML code post to have a look, see if I can find a breakthrough,


Look, this is the corresponding processing code

CodePudding user response:

Try to work out the two DIV click:
The second panel and a second panel of the panel header accrordion - the header these two DIV elements
Click once, see that play a role,

See the code should be both,

CodePudding user response:

reference 13 floor old coconut reply:
try to work out the two DIV click:
The second panel and a second panel of the panel header accrordion - the header these two DIV elements
Click once, see that play a role,

See the code should be both,

As if still can't

CodePudding user response:

reference 13 floor old coconut reply:
try to work out the two DIV click:
The second panel and a second panel of the panel header accrordion - the header these two DIV elements
Click once, see that play a role,

See the code should be both,

Looked at the code, the panel, the panel is through the jquery dynamically generated, will affect positioning elements, but it is certainly I can locate to the elements, can output the text

CodePudding user response:

reference 13 floor old coconut reply:
try to work out the two DIV click:
The second panel and a second panel of the panel header accrordion - the header these two DIV elements
Click once, see that play a role,

See the code should be both,


Again I ask: I study the source code
First of all, the original code is like this:

Originally a div
And then through the jquery above generates a panel
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related