hyperia-sk / highlight-ception Goto Github PK
View Code? Open in Web Editor NEW:art: Visual highlight css element, text or xpath - codecept module
License: MIT License
:art: Visual highlight css element, text or xpath - codecept module
License: MIT License
Running a cest file with seeElement
getting this error as soon as it hits the seeElement, when I remove the module the test runs successfully
codeception v2.3.3
unknown error: $ is not defined
\vendor\facebook\webdriver\lib\remote\HttpCommandExecutor.php:320
\vendor\facebook\webdriver\lib\remote\RemoteWebDriver.php:535
\vendor\facebook\webdriver\lib\remote\RemoteWebDriver.php:296
\vendor\hyperia\highlight-ception\src\HighlightCeption.php:70
\vendor\hyperia\highlight-ception\src\HighlightCeption.php:142
Codeception v2.3.3
testing with canSeeElement
throws unknown error
vendor\hyperia\highlight-ception\src\HighlightCeption.php:70
vendor\hyperia\highlight-ception\src\HighlightCeption.php:144
Sample Xpaths
//td[contains(text(),'text)]/..//..//a[text()='Edit text']
//a[text()='text2']//..//..//td[text()='text3']//..//td[text()='Inactive']
Can we incorporate xpath.js to resolve different resolve different types of xpaths instead of using the function resolveCssSelector
Link to xpath.js
https://github.com/ilinsky/xpath.js/tree/5148efe5851babf06376214cf4f572803f904d41
Codeception Version = 2.3.5
HighlightCeption Version = 1.2.0
Running into an issue where I have text or an element get highlighted and then attempt to click the highlighted text causing codeception to fail because that text now has a span tag
Example:
$I->canSee("//td[contains(text(),'CC_20130130')]/..//a[text()='View Payments']");
$I->click("//td[contains(text(),'CC_20130130')]/..//a[text()='View Payments']");
There was 1 failure:
---------
1) PaymentFileRptCest: Payment file report functionality
Test tests\. . ...
Step Click "//td[contains(text(),'CC_20130130')]/..//a[text()='View Payments'] "
Fail CSS or XPath element with '//td[contains(text(),'CC_20130130')]/..//a[text()='View Payments'] ' was not found.
The highlight only works when watching the browser window, if you enable Codeception\Extension\Recorder and run the tests via a Selenium docker the highlight is removed before the recorder can take its screenshot.
Disabling the final executescript code inside highlightText and highllightElement leaves the highlight in place in the screenshot (although may cause other issues as the html layout may change)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.