diff --git a/src/button/button-contributions.ts b/src/button/button-contributions.ts index 3306e15..c3e6f6d 100644 --- a/src/button/button-contributions.ts +++ b/src/button/button-contributions.ts @@ -410,8 +410,9 @@ export const buttonContributions: ButtonContributionParams[] = [ exampleUrls: [ // "https://bitbucket.org/efftinge/browser-extension-test/pull-requests/1" ], - selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div[1]/div', // section with the "Request changes" and "Approve" buttons + selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div', // grandparent div of the "Request changes" and "Approve" buttons containerElement: createElement("div", {}), + insertBefore: 'xpath:(//*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div)[last()]', // note the [last()] to insert before the last child (the kebab menu) application: "bitbucket", }, { diff --git a/test/src/button-contributions-copy.ts b/test/src/button-contributions-copy.ts index 3306e15..c3e6f6d 100644 --- a/test/src/button-contributions-copy.ts +++ b/test/src/button-contributions-copy.ts @@ -410,8 +410,9 @@ export const buttonContributions: ButtonContributionParams[] = [ exampleUrls: [ // "https://bitbucket.org/efftinge/browser-extension-test/pull-requests/1" ], - selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div[1]/div', // section with the "Request changes" and "Approve" buttons + selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div', // grandparent div of the "Request changes" and "Approve" buttons containerElement: createElement("div", {}), + insertBefore: 'xpath:(//*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div)[last()]', // note the [last()] to insert before the last child (the kebab menu) application: "bitbucket", }, {