W
W
WoozyMasta2018-10-16 18:04:08
Python
WoozyMasta, 2018-10-16 18:04:08

Why is the Selenium remote webdriver not executing the task?

Hello.
There is selenoid in the container, I check in firefox 61 and chrome 68, python3 selenium script.
The task in magento 1.x is to perform user registration.
The problem is when clicking the register button, in the desktop browser the registration passes, in the remote browser, when the button is pressed, the page is refreshed and the form filling is reset.
Locally executing requests from the browser console or Katalon Recoder, everything works out successfully.
When executing a script with a remote webdriver, I have a problem, I tried various methods, all lead to the same result.
Tried:

driver.find_element_by_xpath("/html/body/div[1]/div/section/div/div/div/div/div/form/div[2]/button")).click()

driver.find_element_by_xpath("//div[@class='col-2']/button[@type='submit']").submit()

btn = driver.find_element_by_xpath("//button[.='Зарегистрироваться']"))
driver.execute_script("arguments[0].click();", btn)

driver.find_element_by_tag_name('body').send_keys(Keys.ENTER)

And in this spirit, the page is simply updated, where to dig, what to watch, some kind of mysticism.
Button:
<div class="col-2">
    <button type="submit" title="Зарегистрироваться" class="button ">
        <span>Зарегистрироваться</span>
    </button>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WoozyMasta, 2018-10-18
@WoozyMasta

Everything turned out to be trite, one of the guys changed the cookie domain on the test site, everything worked in desktop browsers, and in the container the request went to another environment without error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question