Comments (3)
@SomeswararaoMarati as mentioned in the error message it is not feasible to transform these statements. They are too different in their syntax. Therefor unfortunately these lines have to be migrated manually.
from codemod.
I will keep this open in case someone wants to tackle this challenge. PRs welcome!
from codemod.
There is a work around on this issue, by commenting out browser.actions() or Key, and migrate the script. if this a large file then you can create a file that will point where you need to comment out.
EX:
const fs = require("fs");
function commentOutBrowserActions(filePath){
try {
if (fs.existsSync(filePath)) {
let file = fs.readFileSync(filePath, 'utf8');
let lines = file.split("\n");
for(let i = 1; i < lines.length; i++){
if (lines[i].includes("browser.actions()") || lines[i].includes("Key.") || lines[i].includes('flow')) {
lines[i] = ">>>>>>> Fix Me" + lines[i];
}
}
let commentedFile = lines.join("\n");
fs.writeFileSync(filePath, commentedFile, 'utf8');
console.log("Done");
}
} catch (error) {
console.log(error);
}
}
const filePath = process.argv[2];
commentOutBrowserActions(filePath);
You can run this file using node index.js file/path
After it is done executing it will be something like this
>>>>>>> Fix Me browser.actions()
Hope this helps!!!
from codemod.
Related Issues (20)
- Create codemods for v9 changes
- $ or $$ are not recognised in V7 working fine in V5 HOT 1
- Getting a lot of undefined errors HOT 7
- Getting Transformation error HOT 2
- Plans to add support for other locators? HOT 2
- [Protractor to WebdriverIO migration] Unable to transform Page Object file HOT 2
- @wdio/codemod/protractor doesn't work with typescript files HOT 1
- Error with sendKeys(Key.UP) HOT 2
- error thrown on semicolon issue HOT 2
- Is Codemod has been tried on Cucumber protractor framework based project migration? HOT 1
- Can not transform "actions" command as it differs too much from the WebdriverIO implementation. We advise to refactor this code.
- Transformation error (Cannot read properties of undefined (reading 'map')) HOT 2
- How to resolve this issue
- Missing await keyword HOT 1
- Async codemod introduces improper awaits and does not create async anonymous function contexts
- Async codemod is inconsistent HOT 2
- Update set-value package to 4.0.1 HOT 1
- Update version this package HOT 2
- Wrapping in multiple awaits HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codemod.