Development

Recently, my tests started failing.
I’m testing on IE11(company policy) on a jenkins windows slave.

My tests all hang on the “This is the initial start page” if I’m not connected to the server.
If I am connected, the tests run as they’re supposed to.

I’m using java bindings 3.141.59 on IE WebDriver 3.15.

I have one http request and it extracted the csrf token.But the csrf token attached with attached with html and javascript.

If the request success the csrf token is attached with HTMl.
If the request fails the csrf is attached with javaScript.
I’m able to extract both and
i need to pass the csrf to next request. based on the condition.
How can i achieve it ?Any suggestions.

When I run my script it gives me this error:
Traceback (most recent call last):
File “C:DevelopmentPython_ProjectSDETpythonProjectSDET_Packagemy_firstProject.py”, line 18, in <module>
search.send_keys(keys.RETURN)
AttributeError: module ‘selenium.webdriver.common.keys’ has no attribute ‘RETURN’

Here is my code:
from selenium import webdriver
import selenium
from selenium.webdriver.common import keys
import time

# this will load googlechrome from the location in C-drive

PATH = “C:Program Files (x86)chromedriver.exe”

driver = webdriver.Chrome(PATH)

driver.get(“https://techwithtim.net”)
print(driver.title) # print the title of the page

search = driver.find_element_by_name(“s”)
search.send_keys(“test”)
search.send_keys(keys.RETURN)
time.sleep(5)
driver.close() # close the browser

A quick overview of all changes and news from the entire Total.js Platform. Read more about our work. Source: Read…