Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
982 views
in Technique[技术] by (71.8m points)

karate - Form input entry fails on chrome when using Remote Web Testing framworks (BrowserStack and LamdaTest)

My test suite works fine locally as well as in gitlab pipeline using Chrome.

However, they fail right on the login page when running them with Chrome (only) on Remote Testing frameworks.
I tested BrowserStack and LamdaTest and they both fail when I attempt to enter text in a form input field.

Error message is:

{"sessionId":"d6c0edadf898c18d38e9dda073a868fa","status":61,"value":{"message":"invalid argument: 'value' must be a list
 (Session info: chrome=80.0.3987.87)
 (Driver info: chromedriver=80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}),platform=Windows NT 10.0.14393 x86_64)"}}

The same tests work on Safari and Firefox, only Chrome fails. I spent some time investigating with the guys at LambdaTest and it seems it all works fine when using "regular" selenium selectors and actions, and only fails with Karate.
Has anyone experienced the same issue?

EDIT: adding non-karate webdriver payloads provided by Prateek Singh

Request POST http://hub.lambdatest.com /wd/hub/session/719c9157598420fb3e272f53be31ab51/elements  
   { using: 'css selector', value: 'input[type=text]' }

Response 200 POST http://hub.lambdatest.com/wd/hub/session/719c9157598420fb3e272f53be31ab51/elements (461ms)
   {
     sessionId: '719c9157598420fb3e272f53be31ab51',
     status: 0,
     value: [ { ELEMENT: '0.37079523975334916-2' } ]
   }
   
Request POST http://hub.lambdatest.com /wd/hub/session/719c9157598420fb3e272f53be31ab51/element/0.37079523975334916-2/value  
   {
     value: [
       'L', 'a', 'm',  'b',
       'd', 'a', 'T',  'e',
       's', 't', '
'
     ]
   }

Response 200 POST http://hub.lambdatest.com/wd/hub/session/719c9157598420fb3e272f53be31ab51/element/0.37079523975334916-2/value (1366ms)
   {
     sessionId: '719c9157598420fb3e272f53be31ab51',
     status: 0,
     value: null
   }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try with the latest selenium version, add the following capability:

caps.setCapability("browserstack.selenium_version", "3.141.59");

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...