Перейти к содержимому

Фотография

Поиск элементов с помощью AutoItDriverServer

Web Driver AutoIt

  • Авторизуйтесь для ответа в теме
Сообщений в теме: 3

#1 skalolaz

skalolaz

    Новый участник

  • Members
  • Pip
  • 51 сообщений
  • ФИО:Andrey

Отправлено 27 января 2015 - 06:16

Всем доброго дня!

 

Подскажите. кто имел дело с этим зверем?

 

Не могу понять как производится поиск элементов. Опираясь небольшой инструкцией

  • WebDriver Find by Method = AutoIt location strategy
  • Find Element By ID = [ID:value]
  • Find Element By Name = [NAME:value]
  • Find Element By XPath = [REGEXPCLASS:value]
  • Find Element By CSS Selector = value passed "as is" unmodified to AutoIt
  • Find Element By Tag Name = [CLASS:value]
  • Find Element By Class Name = [CLASSNN:value]
  • Find Element By Link Text = [TEXT:value]

пытаюсь найти контрол(activeX) 

 

WebElement menu = autoIt.findElement(By.className("ToolbarWindow3213"));

 

получаю следующее

 

org.openqa.selenium.WebDriverException: AutoIt failed to get element [CLASSNN:ToolbarWindow3213]

 

описание контрола

3099e0f75595681d22e54c17838d41ac.png


  • 0

#2 barancev

barancev

    Администратор

  • Admin
  • PipPipPipPipPipPip
  • 6 871 сообщений
  • ФИО:Алексей Баранцев
  • Город:Россия, Москва


Отправлено 27 января 2015 - 06:32

Не забывайте оставлять ссылку на инструмент, если он не общеизвестный.

 

https://github.com/d...oItDriverServer -- этот?

Судя по логу коммитов, ему две недели от роду :)


  • 0
Алексей Баранцев
Тренинги для тестировщиков (тестирование производительности, защищенности, тест-дизайн, автоматизация):
Линейка тренингов по Selenium

#3 skalolaz

skalolaz

    Новый участник

  • Members
  • Pip
  • 51 сообщений
  • ФИО:Andrey

Отправлено 27 января 2015 - 07:43

 

 

https://github.com/d...oItDriverServer -- этот?

он самый


  • 0

#4 skalolaz

skalolaz

    Новый участник

  • Members
  • Pip
  • 51 сообщений
  • ФИО:Andrey

Отправлено 30 января 2015 - 06:08

Ответ разработчика если кому интересно.(тему можно закрыть)

It sounds like element not found. Have you worked with AutoIt separately before like AutoIt scripting or using AutoItX via COM?

Your best debugging solution is to try to find that element natively in AutoIt (script or COM), which is what I mention on the Github wiki page for debugging.

https://github.com/d...oItDriverServer

Try calling ControlGetPosX() and/or ControlGetPosY() from COM or ControlGetPos() from AutoIt script

https://www.autoitsc...ntrolGetPos.htm

if error object/flag is 1, that element not found

If it fails natively in AutoIt, it’s going to fail in AutoItDriverServer. And in that case, the answer/solution, if there is one, is to find the “correct” locator string value to use. What that value is, is for you to find/try out. Sometimes there isn’t, and you have to resort to workarounds, as AutoIt isn’t the best/perfect desktop GUI automation tool, though it is a good one.

For workarounds, there may be some or not depending on what you need to do. For getting element location (or text of element, etc.), you might be out of luck. For clicking element and such, you can always use the mouse click operations based on x,y coordinates rather than click specific element.


  • 0



Темы с аналогичным тегами Web Driver, AutoIt

Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных