webdriver

How to write a CSS Selector selecting elements NOT having a certain attribute?

和自甴很熟 提交于 2021-01-27 02:50:48
问题 How to write a CSS Selector selecting elements NOT having a certain attribute? I have 2 <div> nodes as follows: First: <div class="weEq5" style="will-change; width;"> <button class="_35EW6"> Second: <div class="weEq5"> <button class="_35EW6"> I need to select the <div> (with the similar class) and each of them which have a similar descending <button> but without the style attribute. XPath seems working fine as: //div[@class and not (@style)]/button I am looking for an equivalent CssSelector .

How to write a CSS Selector selecting elements NOT having a certain attribute?

久未见 提交于 2021-01-27 02:50:05
问题 How to write a CSS Selector selecting elements NOT having a certain attribute? I have 2 <div> nodes as follows: First: <div class="weEq5" style="will-change; width;"> <button class="_35EW6"> Second: <div class="weEq5"> <button class="_35EW6"> I need to select the <div> (with the similar class) and each of them which have a similar descending <button> but without the style attribute. XPath seems working fine as: //div[@class and not (@style)]/button I am looking for an equivalent CssSelector .

Counting elements with the same selector in webdriver.io

可紊 提交于 2021-01-26 14:51:41
问题 I am using webdriver.io with chai and mocha for testing. In one of my tests I need to count how many elements with the same CSS class are in the page. None of the webdriver.io API seems to return an array. How can it be achieved? 回答1: This is how you do it: client.elements('.myElements', function(err,res) { console.log('element count: ',res.value.length); }); Explanation: with elements you fetch all elements according given selector. It returns an array of webdriver elements which represents

Counting elements with the same selector in webdriver.io

ε祈祈猫儿з 提交于 2021-01-26 14:51:19
问题 I am using webdriver.io with chai and mocha for testing. In one of my tests I need to count how many elements with the same CSS class are in the page. None of the webdriver.io API seems to return an array. How can it be achieved? 回答1: This is how you do it: client.elements('.myElements', function(err,res) { console.log('element count: ',res.value.length); }); Explanation: with elements you fetch all elements according given selector. It returns an array of webdriver elements which represents

selenium.JavascriptException: javascript error: Failed to execute 'elementFromPoint' on 'Document': The provided double value is non-finite

…衆ロ難τιáo~ 提交于 2021-01-21 07:10:28
问题 using chrome 78 and chromedriver78 When i click an audio file or try to stop an audio using selenium tests i am getting this error. Error: org.openqa.selenium.JavascriptException: javascript error: Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite. Note it happens only with remote webdriver and its not consistent. Error stack trace: When the audio player of the "item_1" element is stopped in "[data-rcfid='checkbox_7']" org.openqa.selenium

List of Firefox and Chrome arguments/preferences

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-21 04:56:41
问题 As a tester, I would like to study a list of possible configuration arguments for Firefox and Chrome, So that I can configure my testing tools with knowledge Reading API indicates that there are methods with whom we can pass arguments to a webdriver instance: FirefoxOptions.AddArgument FirefoxOptions.SetLoggingPreference (inherited from DriverOptions) FirefoxOptions.SetPreference What exactly can be the possible arguments passed to these methods and what they do ? Is there a resource online

How to search node by exact text match using Xpath in webdriver

女生的网名这么多〃 提交于 2021-01-20 18:54:31
问题 I need a little help regarding searching an exact text using xpath in webDriver. Suppose i have the html as follows.. <html><body> <table> <tr> <td><button>abcd</button></td> <td><button>abc</button></td> </tr> </table> </body></html> Now i want to click button "abc" I used xpath as //button[contains(text(),'abc')] but it is always performing on button "abcd" as it also contain the text "abc". In this regards I need a predicate or some other procedure which can search exact text instead of

OSX fix Selenium Chromedriver launch error spawn Unknown system error -86 Bad CPU type in executable?

北城以北 提交于 2021-01-18 12:03:33
问题 Suddenly on the afternoon of January 6, 2021, my Selenium Protractor tests under OSX stopped working with the mysterious error spawn Unknown system error -86 I did some research and discovered that error number 86 is the same as Bad CPU type in executable and ran the following to compare the cpu architecture of my chromedriver binary to my system: % file chromedriver_87.0.4280.88 chromedriver_87.0.4280.88: Mach-O 64-bit executable arm64 % uname -a Darwin kobl179273m 19.6.0 Darwin Kernel

ElementClickInterceptedException: Message: element click intercepted Element is not clickable error clicking a radio button using Selenium and Python

我的梦境 提交于 2021-01-09 12:45:24
问题 I am trying to click on the first box (ASN / DSD) But I get this error message: selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input type="radio" name="docTypes" ng-model="$ctrl.documentTypes.selected" id="documentType-0" ng-change="$ctrl.onChangeDocumentType()" ng-value="documentType" tabindex="0" class="ng-pristine ng-untouched ng-valid ng-empty" value="[object Object]" aria-invalid="false"> is not clickable at point (338, 202).

ElementClickInterceptedException: Message: element click intercepted Element is not clickable error clicking a radio button using Selenium and Python

跟風遠走 提交于 2021-01-09 12:44:52
问题 I am trying to click on the first box (ASN / DSD) But I get this error message: selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input type="radio" name="docTypes" ng-model="$ctrl.documentTypes.selected" id="documentType-0" ng-change="$ctrl.onChangeDocumentType()" ng-value="documentType" tabindex="0" class="ng-pristine ng-untouched ng-valid ng-empty" value="[object Object]" aria-invalid="false"> is not clickable at point (338, 202).