How can I click and find elements inside an iframe?

cesario678

Client
Регистрация
10.03.2022
Сообщения
233
Реакции
13
Баллы
18
I’m having a problem with an iframe block here. I can’t seem to find its elements at all. I managed to find the element, but it never actually clicks.


Then I tried using an element outside the iframe: I get its coordinates and create a click at a position below or above that element. The problem is that the element is large, and sometimes the actual position where I need to click is not in the same place relative to that element. Sometimes it moves to a completely different location.


Does anyone have any tips or a way to find this element so I can click it? Is there some trick or technique that could help me figure this out?


Thank you!
 
Oh, and just to add: I also tried using image recognition to find and click the element. However, the buttons I need to click are transparent, and there are different colors and objects in the background, so image recognition never clicks the correct spot.
 
The information you provided is not enough to help.
We need examples of pages and elements with which problems arise.
Everything depends a lot on the context.
Now it is not a problem to send the DOM to AI and get the necessary XPath paths for clicks.
You need to click on pictures when there are no other ways.
And whether there are other ways - it is impossible to know without a site and the path you need to follow to repeat what you are doing.

Google Translate
 
The information you provided is not enough to help.
We need examples of pages and elements with which problems arise.
Everything depends a lot on the context.
Now it is not a problem to send the DOM to AI and get the necessary XPath paths for clicks.
You need to click on pictures when there are no other ways.
And whether there are other ways - it is impossible to know without a site and the path you need to follow to repeat what you are doing.

Google Translate
<div class="CDLayout2067515" style="...background-color: rgba(0,0,0,0.5)...">
<a href="https://vignoli.com/ghits/30356/..."
class="CDButton2067515"
style="...top: 58.01%; left: 29.28%...">Va</a>
</div>

This is what I need to click; I got it from the DOM.

So first I need to click somewhere on my website for it to appear, and then this “Va” button appears.

Do you have any other tips now on how I should create it in Rise Click so that it can click on that button? Or would there be another way to do it?
 
<div class="CDLayout2067515" style="...background-color: rgba(0,0,0,0.5)...">
<a href="https://vignoli.com/ghits/30356/..."
class="CDButton2067515"
style="...top: 58.01%; left: 29.28%...">Va</a>
</div>
This is roughly what you need:
Send to Gemini DOM.
Please give XPath
Then please use it for clicking in Zennoposter.
We get approximately the following code:
C#:
Развернуть Свернуть Копировать
var tab = instance.ActiveTab;
var button = tab.FindElementByXPath("//div[starts-with(@class, 'CDLayout')]//a[starts-with(@class, 'CDButton') and text()='Va']", 0);
if (!button.IsVoid) button.Click();
else throw new Exception("not button");

The code may not work - I just described the process.
Google Translate
 

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