Using selenium in 'click' on elements with no input or no control

Someone managed to get Selenium in order to pull out a mouse click on an element that is not associated with the input, i.e. plain text ? I tried using the click () and click_at () methods, as well as fire_event (locator, event), where the "event" is "onclick" or using combinations of the "onmousedown" and "onmouseup" events. I also tried preceding these events with the onmouseover event. In my application, clicking on this “plain text” calls the flash.swf function. Thank.

+3
source share
4 answers

Have you tried adapting your mouse listener? If you are distributing Selenium using Java, here is a quick tutorial.

0
source

Have you tried using fire_event (locator, 'click') instead of 'onclick'?

0
source

? , //p[contains(text(),'yourtext')] . .

0

.click() , Firefox 31.6.0 ESR ( ) Chrome. , , ( - ), JavascriptExecutor, ( Selenium).

0

Source: https://habr.com/ru/post/1793110/


All Articles