Skip to content

Commit

Permalink
Merge pull request #2 from eng1n88r/feature/fix-bugs
Browse files Browse the repository at this point in the history
fix: Fix latest issues.
  • Loading branch information
eng1n88r authored Sep 12, 2024
2 parents 6e119dc + 65bcee3 commit 51176d9
Show file tree
Hide file tree
Showing 6 changed files with 2,871 additions and 25 deletions.
20 changes: 12 additions & 8 deletions desktop.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
////LINUX:
const pathToChromeProfile = '/home/user/.config/chromium/Default/BING';
// const pathToChromeProfile = '/home/user/.config/chromium/Default/BING';

////WINDOWS
// const pathToChromeProfile = 'C:/Users/user/AppData/Local/Google/Chrome/User Data/BING';
const pathToChromeProfile = 'C:/Users/exbarboss/AppData/Local/Microsoft/Edge/User Data/Default';
const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62';

exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['desktop.search.js'],
allScriptsTimeout: 50000,
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['user-data-dir=' + pathToChromeProfile]
}
}
// capabilities: {
// 'browserName': 'MicrosoftEdge',
// 'chromeOptions': {
// 'args': [
// 'user-agent=' + userAgent,
// 'user-data-dir=' + pathToChromeProfile
// ]
// }
// }
};
4 changes: 2 additions & 2 deletions helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const search = function (button_element_id) {
const test = function(index, word, button_element_id) {
it('should search something', function (done) {
browser.ignoreSynchronization = true;
browser.get('https://bing.com');
browser.get('https://www.bing.com');

element(by.id('sb_form_q')).clear();
element(by.id('sb_form_q')).sendKeys(word + ' ' + Math.random() * 10000);
element(by.id(button_element_id)).click();
element(by.id(button_element_id)).submit();
expect(index).toBe(index);
setTimeout(done, 10);
});
Expand Down
22 changes: 11 additions & 11 deletions mobile.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
const userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/601.1';

////LINUX:
const pathToChromeProfile = '/home/user/.config/chromium/Default/BING';
// const pathToChromeProfile = '/home/user/.config/chromium/Default/BING';

////WINDOWS
// const pathToChromeProfile = 'C:/Users/user/AppData/Local/Google/Chrome/User Data/BING';
const pathToChromeProfile = 'C:/Users/exbarboss/AppData/Local/Microsoft/Edge/User Data/Default';

exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['mobile.search.js'],
allScriptsTimeout: 50000,
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': [
'user-agent=' + userAgent,
'user-data-dir=' + pathToChromeProfile
]
}
}
// capabilities: {
// 'browserName': 'MicrosoftEdge',
// 'chromeOptions': {
// 'args': [
// 'user-agent=' + userAgent,
// 'user-data-dir=' + pathToChromeProfile
// ]
// }
// }
};
2 changes: 1 addition & 1 deletion mobile.search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const helper = require('./helpers/utils');

describe('bing mobile search', () => helper.search('sbBtn'));
describe('bing mobile search', () => helper.search('sb_form_go'));
Loading

0 comments on commit 51176d9

Please sign in to comment.